Skip to content

Add inja escape() function to HTML escape values - #66616

Merged
elpaso merged 1 commit into
qgis:fix-server-xssfrom
elpaso:fix-server-xss
Jul 1, 2026
Merged

Add inja escape() function to HTML escape values#66616
elpaso merged 1 commit into
qgis:fix-server-xssfrom
elpaso:fix-server-xss

Conversation

@elpaso

@elpaso elpaso commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

This fixes GHSA-cr49-pm9v-m788

@elpaso elpaso added Bug Either a bug report, or a bug fix. Let's hope for the latter! Security backport release-3_44 labels Jun 30, 2026
@github-actions github-actions Bot added this to the 4.2.0 milestone Jun 30, 2026
@github-actions github-actions Bot added the Server Related to QGIS server label Jun 30, 2026
Comment thread src/server/qgsserverogcapihandler.cpp

@benoitdm-oslandia benoitdm-oslandia left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@github-actions

github-actions Bot commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

🍎 MacOS Qt6 builds

Download MacOS Qt6 builds of this PR for testing.
This app is not notarized, run sudo xattr -d com.apple.quarantine /Applications/QGIS*.app to avoid the warning
(Built from commit d665246)

🪟 Windows Qt6 builds

Download Windows Qt6 builds of this PR for testing.
To execute locally, unzip the downloaded zip file and run bin\qgis-bin.exe in the extracted directory.
You might be prompted by Windows Defender click "Run anyway"
(Built from commit d665246)

@elpaso
elpaso merged commit 3a1f3ce into qgis:fix-server-xss Jul 1, 2026
34 checks passed
@qgis-bot

qgis-bot commented Jul 1, 2026

Copy link
Copy Markdown
Collaborator

The backport to release-3_44 failed:

The process '/usr/bin/git' failed with exit code 1
stderr
error: could not apply d66524683b5... Add inja escape() function to HTML escape values
hint: After resolving the conflicts, mark them with
hint: "git add/rm <pathspec>", then run
hint: "git cherry-pick --continue".
hint: You can instead skip this commit with "git cherry-pick --skip".
hint: To abort and get back to the state before "git cherry-pick",
hint: run "git cherry-pick --abort".
hint: Disable this message with "git config set advice.mergeConflict false"

stdout
Auto-merging src/server/qgsserverogcapihandler.cpp
CONFLICT (content): Merge conflict in src/server/qgsserverogcapihandler.cpp
Auto-merging tests/src/python/test_qgsserver_api.py

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-release-3_44 release-3_44
# Navigate to the new working tree
cd .worktrees/backport-release-3_44
# Create a new branch
git switch --create backport-66616-to-release-3_44
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick d66524683b5fabfee4aacff8cc34ba5e6567e6d2
# Push it to GitHub
git push --set-upstream origin backport-66616-to-release-3_44
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-release-3_44

Then, create a pull request where the base branch is release-3_44 and the compare/head branch is backport-66616-to-release-3_44.

@qgis-bot qgis-bot added the failed backport The automated backport attempt failed, needs a manual backport label Jul 1, 2026
@benoitdm-oslandia

Copy link
Copy Markdown
Collaborator

Thanks @elpaso for the fix and to add me to the security team!

@elpaso

elpaso commented Jul 1, 2026

Copy link
Copy Markdown
Contributor Author

Thanks @elpaso for the fix and to add me to the security team!

No problem, actually I was trying to grant you access to the whole security section but I didn't find a way to do it (I'm not very familiar with that).

Do you now have access to all the advisories?

Ideally we should have a security "github team" with all people in that group having access to all the security advisories.

@benoitdm-oslandia

Copy link
Copy Markdown
Collaborator

Do you now have access to all the advisories?

I am only seeing one, may be because there is only one to see?

image

Ideally we should have a security "github team" with all people in that group having access to all the security advisories.

Yes it would be great!

@jef-n

jef-n commented Aug 12, 2026

Copy link
Copy Markdown
Member

@elpaso shouldn't this be merged to master?

@elpaso

elpaso commented Aug 12, 2026

Copy link
Copy Markdown
Contributor Author

This fixes GHSA-cr49-pm9v-m788

Yes, I thought it was but I surely made a mistake in the process, here it is a new PR:

#67044

@jef-n

jef-n commented Aug 12, 2026

Copy link
Copy Markdown
Member

Yes, I thought it was but I surely made a mistake in the process, here it is a new PR:

Me too, I wondered why it wasn't there while working on #66972 and wondered how it could be merged and reverted without a trace ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport release-3_44 Bug Either a bug report, or a bug fix. Let's hope for the latter! failed backport The automated backport attempt failed, needs a manual backport Security Server Related to QGIS server

4 participants