Skip to content
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

Merged
merged 2 commits into from
Dec 17, 2024

Conversation

alokhyland
Copy link
Collaborator

No description provided.

@alokhyland alokhyland requested a review from a team as a code owner December 15, 2024 12:53
@alokhyland alokhyland requested review from MohinishSah and aradhanas9 and removed request for a team December 15, 2024 12:53
@alokhyland alokhyland force-pushed the feature-lts2021-csp-changes-part2 branch from a0a5503 to 9e00c20 Compare December 15, 2024 12:54
String cspHeader = resp.getHeader("Content-Security-Policy");
String newCspHeader = "";
boolean isnewCspHeaderEmpty = false;
if(cspHeader != null && cspHeader.trim().isEmpty()) {

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;

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();

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

@alokhyland alokhyland force-pushed the feature-lts2021-csp-changes-part2 branch from 9e00c20 to aec4105 Compare December 16, 2024 06:18
@alokhyland alokhyland merged commit f75190e into maintenance-3.0.x Dec 17, 2024
8 checks passed
@alokhyland alokhyland deleted the feature-lts2021-csp-changes-part2 branch December 17, 2024 05:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants