mirror of
https://gitee.com/ssssssss-team/magic-boot.git
synced 2026-04-26 00:00:04 +08:00
万能密码
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
"groupId" : "1952f25c81084e24b55b11385767dc38",
|
||||
"name" : "登录",
|
||||
"createTime" : null,
|
||||
"updateTime" : 1635043797677,
|
||||
"updateTime" : 1635578719816,
|
||||
"lock" : "0",
|
||||
"method" : "POST",
|
||||
"path" : "/login",
|
||||
@@ -134,8 +134,15 @@
|
||||
import log
|
||||
import 'cn.dev33.satoken.secure.SaSecureUtil';
|
||||
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){
|
||||
exit 0,'用户名或密码错误'
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
"groupId" : "5c36bdc1de454d6e9d1a464d87c96091",
|
||||
"name" : "获取所有配置",
|
||||
"createTime" : null,
|
||||
"updateTime" : 1635490462052,
|
||||
"updateTime" : 1635576982955,
|
||||
"lock" : "0",
|
||||
"method" : "GET",
|
||||
"path" : "/list",
|
||||
@@ -93,7 +93,7 @@
|
||||
"optionMap" : { }
|
||||
}
|
||||
================================
|
||||
import 'org.psyduck.common.utils.WebUtils'
|
||||
import 'org.ssssssss.magicboot.utils.WebUtils'
|
||||
|
||||
return {
|
||||
filePrefix: WebUtils.getUeditorPrefix()
|
||||
|
||||
Reference in New Issue
Block a user