github-advanced-security[bot] commented on code in PR #889: URL: https://github.com/apache/ofbiz-framework/pull/889#discussion_r2073412379
########## framework/security/src/main/java/org/apache/ofbiz/security/SecurityUtil.java: ########## @@ -153,9 +153,11 @@ if (UtilValidate.isNotEmpty(jwtToken)) { try { GenericValue userLogin = EntityQuery.use(delegator).from("UserLogin").where("userLoginId", userLoginId).queryOne(); - Map<String, Object> claims = JWTManager.validateToken(delegator, jwtToken, - userLogin.getString("userLoginId") + userLogin.getString("currentPassword")); - return (!ServiceUtil.isError(claims)) && userLoginId.equals(claims.get("userLoginId")); + if (userLoginId != null) { + Map<String, Object> claims = JWTManager.validateToken(delegator, jwtToken, + userLogin.getString("userLoginId") + userLogin.getString("currentPassword")); Review Comment: ## Insecure randomness Potential Insecure randomness due to a [Insecure randomness source.](1). [Show more details](https://github.com/apache/ofbiz-framework/security/code-scanning/1839) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: notifications-unsubscr...@ofbiz.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org