Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,14 @@ public int insertUser(JSONObject obj, HttpServletRequest request)throws Exceptio
@Transactional(value = "transactionManager", rollbackFor = Exception.class)
public int updateUser(JSONObject obj, HttpServletRequest request) throws Exception{
User user = JSONObject.parseObject(obj.toJSONString(), User.class);
// tenantId must never be settable through this endpoint: updateByPrimaryKeySelective
// writes every non-null field from the client-supplied JSON, and the tenant SQL
// parser only scopes which row the UPDATE's WHERE clause can reach (by the caller's
// own tenant), not what the SET clause is allowed to write. Without this, a caller
// could set their own (or any row within their tenant's) tenantId to 0, which the
// tenant filter treats as unrestricted super-admin access on every later request
// made with that user's token.
user.setTenantId(null);
int result=0;
try{
//判断是否登录过
Expand Down