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

Notifications: should escape <a href> value #1545

Open
smcv opened this issue Dec 22, 2024 · 0 comments
Open

Notifications: should escape <a href> value #1545

smcv opened this issue Dec 22, 2024 · 0 comments
Labels

Comments

@smcv
Copy link
Collaborator

smcv commented Dec 22, 2024

Operating System

n/a, source code inspection

XDG Desktop Portal version

Other

XDG Desktop Portal version (Other)

1.19.1

Desktop Environment

Other

Desktop Environment (Other)

n/a, source code inspection

Expected Behavior

If a client sends for example {"markup-body": <'<a href="&lt;&quot;&gt;">'>}, the href attribute should be re-escaped when emitting the filtered/sanitized markup-body.

Current Behavior

If I'm reading the code correctly, this

+          if (strcmp (attribute_names[i], "href") == 0)
+            {
+              g_string_append_printf (composed, "<a href=\"%s\">", attribute_values[i]);
+              break;
+            }

will emit the attribute unescaped.

Steps to Reproduce

n/a, source code inspection

Anything else we should know?

No response

@smcv smcv added the bug label Dec 22, 2024
@github-project-automation github-project-automation bot moved this to Needs Triage in Triage Dec 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Needs Triage
Development

No branches or pull requests

1 participant