Skip to content

fix: prevent URL parameter injection in user annotation links#1325

Merged
karlkleinpaste merged 1 commit into
crosswire:masterfrom
hyder365:fix/annotation-injection
Jun 17, 2026
Merged

fix: prevent URL parameter injection in user annotation links#1325
karlkleinpaste merged 1 commit into
crosswire:masterfrom
hyder365:fix/annotation-injection

Conversation

@hyder365

Copy link
Copy Markdown
Contributor

User annotation content (e->annotation->str) was being interpolated directly into the value= query parameter of the passagestudy.jsp URL in both GTKChapDisp::display() and DialogChapDisp::display() without URL encoding.

While basic HTML characters like <, >, " were escaped, URI-significant characters such as &, =, #, +, and % passed through unmodified. A crafted annotation like &module=EvilMod&passage=EvilRef could inject arbitrary URL parameters.

Applied g_uri_escape_string() to the annotation value before embedding it into the href attribute in both locations.

@karlkleinpaste karlkleinpaste merged commit b70cdff into crosswire:master Jun 17, 2026
7 checks passed
@karlkleinpaste

Copy link
Copy Markdown
Contributor

Thanx much for the fix.

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.

2 participants