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

[Fixes #11862] Sanitize HTML data #11859

Merged
merged 4 commits into from
Feb 13, 2024
Merged

[Fixes #11862] Sanitize HTML data #11859

merged 4 commits into from
Feb 13, 2024

Conversation

t-book
Copy link
Contributor

@t-book t-book commented Jan 21, 2024

Add a new template tag for legacy pages to sanitize html with nh3

Checklist

Reviewing is a process done by project maintainers, mostly on a volunteer basis. We try to keep the overhead as small as possible and appreciate if you help us to do so by completing the following items. Feel free to ask in a comment if you have troubles with any of them.

For all pull requests:

  • Confirm you have read the contribution guidelines
  • You have sent a Contribution Licence Agreement (CLA) as necessary (not required for small changes, e.g., fixing typos in the documentation)
  • Make sure the first PR targets the master branch, eventual backports will be managed later. This can be ignored if the PR is fixing an issue that only happens in a specific branch, but not in newer ones.

The following are required only for core and extension modules (they are welcomed, but not required, for contrib modules):

  • There is a ticket in https://github.com/GeoNode/geonode/issues describing the issue/improvement/feature (a notable exemption is, changes not visible to end-users)
  • The issue connected to the PR must have Labels and Milestone assigned
  • PR for bug fixes and small new features are presented as a single commit
  • Commit message must be in the form "[Fixes #<issue_number>] Title of the Issue"
  • New unit tests have been added covering the changes, unless there is an explanation on why the tests are not necessary/implemented
  • This PR passes all existing unit tests (test results will be reported by travis-ci after opening this PR)
  • This PR passes the QA checks: black geonode && flake8 geonode
  • Commits changing the settings, UI, existing user workflows, or adding new functionality, need to include documentation updates
  • Commits adding new texts do use gettext and have updated .po / .mo files (without location infos)

Submitting the PR does not require you to check all items, but by the time it gets merged, they should be either satisfied or inapplicable.

@t-book t-book added the security Pull requests that address a security vulnerability label Jan 21, 2024
@cla-bot cla-bot bot added the cla-signed CLA Bot: community license agreement signed label Jan 21, 2024
@t-book t-book added this to the 4.3.0 milestone Jan 21, 2024
@t-book t-book changed the title Sanitize HTML data Jan 21, 2024
@mattiagiupponi mattiagiupponi changed the title [#11862] Sanitize HTML data Feb 2, 2024
requirements.txt Outdated Show resolved Hide resolved
@t-book
Copy link
Contributor Author

t-book commented Feb 7, 2024

Test is failing with
45.08 AttributeError: module 'modeltranslation' has no attribute 'version'
I'll check

@giohappy
Copy link
Contributor

giohappy commented Feb 7, 2024

@t-book probably you need to merge master

@t-book
Copy link
Contributor Author

t-book commented Feb 10, 2024

thanks @giohappy I've rebased

@t-book t-book requested a review from giohappy February 11, 2024 15:51
@giohappy
Copy link
Contributor

@t-book I see there are conflicts to be resolved

@t-book
Copy link
Contributor Author

t-book commented Feb 13, 2024

@giohappy The PR became outdated with this PR some hours ago f07dd0c
I've solved the conflict.

@giohappy giohappy merged commit 9d6a246 into GeoNode:master Feb 13, 2024
15 of 16 checks passed
Copy link
Contributor

The backport to 4.2.x failed:

The process '/usr/bin/git' failed with exit code 1

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-4.2.x 4.2.x
# Navigate to the new working tree
cd .worktrees/backport-4.2.x
# Create a new branch
git switch --create backport-11859-to-4.2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 9d6a2469da510313006b6a95df8c01573607a49e
# Push it to GitHub
git push --set-upstream origin backport-11859-to-4.2.x
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-4.2.x

Then, create a pull request where the base branch is 4.2.x and the compare/head branch is backport-11859-to-4.2.x.

@giohappy
Copy link
Contributor

@t-book can you take a look at the backport?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 4.2.x cla-signed CLA Bot: community license agreement signed security Pull requests that address a security vulnerability
3 participants