You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Details: There's a potential security vulnerability in the fromBase64List method. The method uses Base64.decodeBase64() without any input validation, which could lead to security issues if the input is not properly sanitized.
Details: A potential security vulnerability has been introduced in the getCreditCardNumber() method. This method returns the account ID of a credit card, which could be sensitive information. It should be properly secured or removed if not necessary.
Affected Code Snippet:
publiclonggetCreditCardNumber(){
for (Accountaccount: getAccounts()){
if (DBUtil.CREDIT_CARD_ACCOUNT_NAME.equals(account.getAccountName()))
returnaccount.getAccountId();
}
return -1L;
}
Details: Potential security vulnerability introduced in the getUser method. The method retrieves the access token from the Authorization header without proper validation, which could lead to security issues if the header is missing or malformed.
Details: There is a potential bug in the sanitzieHtmlWithRegex method. The method name is misspelled, which could lead to confusion and errors if developers try to use this method.
Affected Code Snippet:
publicstaticStringsanitzieHtmlWithRegex(Stringinput) {
if (XSS_REGEXP.matcher(input).matches()) {
return"";
}
returninput;
}
Start Line: 257
End Line: 261
Details: There is a potential security vulnerability in the establishSession method. The method creates a cookie with user account information, but it's not clear if this information is properly encrypted or protected. Storing sensitive information in cookies without proper security measures can lead to security breaches.
Details: The isLoggedin method has a potential bug. It always returns true at the end of the method, regardless of whether the user is actually logged in or not. This could lead to unauthorized access to protected resources.
Affected Code Snippet:
staticpublicbooleanisLoggedin(HttpServletRequestrequest){
try {
// Check user is logged inUseruser = (User)request.getSession().getAttribute(ServletUtil.SESSION_ATTR_USER);
if (user == null){
returnfalse;
}
} catch (Exceptione) {
// Logreturnfalse;
}
returntrue;
}
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request from patched fixes 23 issues.