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

Protect against comma in pgfkeys arguments #1072

Merged
merged 1 commit into from
Nov 10, 2021

Conversation

hmenke
Copy link
Member

@hmenke hmenke commented Nov 9, 2021

Motivation for this change

Fixes #389

This should guard against most of the accidental injections of commas through forwarded arguments in pgfkeys.

Checklist

Please signoff your commits to explicitly state your agreement to the Developer Certificate of Origin. If that is not possible you may check the boxes below instead:

Copy link
Member

@muzimuzhi muzimuzhi left a comment

Choose a reason for hiding this comment

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

Though I hardly know anything about some of the touched source fils, to my knowledge of pgfkeys, all changes are at least harmless.

I have some more changes in local branch, and will push them soon.

@muzimuzhi
Copy link
Member

oops, not signed

@muzimuzhi
Copy link
Member

I made another kind of changes in https://github.com/muzimuzhi/pgf/tree/delimited-args, not sure if it suits the current PR.

Basically what it did is protecting passing an arg absorbed as delimited, to act as a delimited arg again.

 \def\tikz@intersect@name@parse{\pgfutil@ifnextchar[\tikz@intersect@name@parse@opt{\tikz@intersect@name@parse@opt[]}}%}
 \def\tikz@intersect@name@parse@opt[#1]#2\pgf@stop{%
-  \coordinate [#1] (#2) at (\tikz@intersect@@name-\tikz@intersection@count);
+  \coordinate [{#1}] (#2) at (\tikz@intersect@@name-\tikz@intersection@count);
 }%

Co-authored-by: muzimuzhi <muzimuzhi@gmail.com>
Signed-off-by: Henri Menke <henri@henrimenke.de>
@hmenke hmenke merged commit a7b45b3 into pgf-tikz:master Nov 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

Handling of braces inside “proxy keys” (e.g. minimum size)
2 participants