mirror of
https://gitee.com/ssssssss-team/magic-boot.git
synced 2025-01-19 12:02:50 +08:00
万能密码
This commit is contained in:
parent
04ecd3ef25
commit
d903c1ee3b
@ -5,7 +5,7 @@
|
|||||||
"groupId" : "1952f25c81084e24b55b11385767dc38",
|
"groupId" : "1952f25c81084e24b55b11385767dc38",
|
||||||
"name" : "登录",
|
"name" : "登录",
|
||||||
"createTime" : null,
|
"createTime" : null,
|
||||||
"updateTime" : 1635043797677,
|
"updateTime" : 1635578719816,
|
||||||
"lock" : "0",
|
"lock" : "0",
|
||||||
"method" : "POST",
|
"method" : "POST",
|
||||||
"path" : "/login",
|
"path" : "/login",
|
||||||
@ -134,8 +134,15 @@
|
|||||||
import log
|
import log
|
||||||
import 'cn.dev33.satoken.secure.SaSecureUtil';
|
import 'cn.dev33.satoken.secure.SaSecureUtil';
|
||||||
import 'cn.dev33.satoken.stp.StpUtil';
|
import 'cn.dev33.satoken.stp.StpUtil';
|
||||||
|
import env;
|
||||||
|
|
||||||
|
var user
|
||||||
|
if(env.get('super-password') == body.password){
|
||||||
|
user = db.table("sys_user").where().eq("username",body.username).selectOne()
|
||||||
|
}else{
|
||||||
|
user = db.table("sys_user").where().eq("username",body.username).eq("password",SaSecureUtil.sha256(body.password)).selectOne()
|
||||||
|
}
|
||||||
|
|
||||||
var user = db.table("sys_user").where().eq("username",body.username).eq("password",SaSecureUtil.sha256(body.password)).selectOne()
|
|
||||||
if(!user){
|
if(!user){
|
||||||
exit 0,'用户名或密码错误'
|
exit 0,'用户名或密码错误'
|
||||||
}
|
}
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
"groupId" : "5c36bdc1de454d6e9d1a464d87c96091",
|
"groupId" : "5c36bdc1de454d6e9d1a464d87c96091",
|
||||||
"name" : "获取所有配置",
|
"name" : "获取所有配置",
|
||||||
"createTime" : null,
|
"createTime" : null,
|
||||||
"updateTime" : 1635490462052,
|
"updateTime" : 1635576982955,
|
||||||
"lock" : "0",
|
"lock" : "0",
|
||||||
"method" : "GET",
|
"method" : "GET",
|
||||||
"path" : "/list",
|
"path" : "/list",
|
||||||
@ -93,7 +93,7 @@
|
|||||||
"optionMap" : { }
|
"optionMap" : { }
|
||||||
}
|
}
|
||||||
================================
|
================================
|
||||||
import 'org.psyduck.common.utils.WebUtils'
|
import 'org.ssssssss.magicboot.utils.WebUtils'
|
||||||
|
|
||||||
return {
|
return {
|
||||||
filePrefix: WebUtils.getUeditorPrefix()
|
filePrefix: WebUtils.getUeditorPrefix()
|
||||||
|
1
magic-boot/src/main/resources/application-dev.yml
Normal file
1
magic-boot/src/main/resources/application-dev.yml
Normal file
@ -0,0 +1 @@
|
|||||||
|
super-password: 1xx
|
1
magic-boot/src/main/resources/application-online.yml
Normal file
1
magic-boot/src/main/resources/application-online.yml
Normal file
@ -0,0 +1 @@
|
|||||||
|
super-password: 123456
|
@ -5,6 +5,8 @@ server:
|
|||||||
min-response-size: 128
|
min-response-size: 128
|
||||||
|
|
||||||
spring:
|
spring:
|
||||||
|
profiles:
|
||||||
|
active: dev
|
||||||
servlet:
|
servlet:
|
||||||
multipart:
|
multipart:
|
||||||
max-file-size: 200MB
|
max-file-size: 200MB
|
||||||
|
Loading…
Reference in New Issue
Block a user