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

[GEOS-11379] Refactor inline JavaScript in the OGC API modules #7587

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

sikeoka
Copy link
Contributor

@sikeoka sikeoka commented Apr 30, 2024

GEOS-11379 Powered by Pull Request Badge

This PR moves the inline JavaScript in all of the OGC API community modules into external files. This PR is related to Content-Security-Policy work for GeoServer 2.26.0 and should NOT be backported.

All Java inputs that were previously written directly into the script tag are now written to hidden input fields that the external JavaScript file will read. Enabling HTML escaping was necessary to not introduce new vulnerabilities with this PR but that also required changing how the pagecrumbs are initialized everywhere.

This PR uses the new webresources path added to gs-main by #7554 which does not affect unit tests but is required if attempting to manually run GeoServer with these changes.

Checklist

For core and extension modules:

  • New unit tests have been added covering the changes.
  • Documentation has been updated (if change is visible to end users).
  • The REST API docs have been updated (when changing configuration objects or the REST controllers).
  • There is an issue in the GeoServer Jira (except for changes that do not affect administrators or end users in any way).
  • Commit message(s) must be in the form [GEOS-XYZWV] Title of the Jira ticket.
  • Bug fixes and small new features are presented as a single commit.
  • Each commit has a single objective (if there are multiple commits, each has a separate JIRA ticket describing its goal).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant