-
Notifications
You must be signed in to change notification settings - Fork 61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature lts2021 csp changes part2 #2396
Feature lts2021 csp changes part2 #2396
Conversation
a0a5503
to
9e00c20
Compare
String cspHeader = resp.getHeader("Content-Security-Policy"); | ||
String newCspHeader = ""; | ||
boolean isnewCspHeaderEmpty = false; | ||
if(cspHeader != null && cspHeader.trim().isEmpty()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cspHeader == null || cspHeader.trim().isEmpty()
String newCspHeader = ""; | ||
boolean isnewCspHeaderEmpty = false; | ||
if(cspHeader != null && cspHeader.trim().isEmpty()) { | ||
isnewCspHeaderEmpty = true; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
isExistingCspHeaderEmpty
boolean foundScriptSrcMatch = false; | ||
boolean foundObjectSrcMatch = false; | ||
for (int i = 0; i < directives.length; i++) { | ||
String directive = directives[i].trim(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
declare directive as String outside the for loop
9e00c20
to
aec4105
Compare
No description provided.