SwiftBar icon indicating copy to clipboard operation
SwiftBar copied to clipboard

Improper unescaping of notification body

Open fenhl opened this issue 3 years ago • 0 comments

Describe the bug + characters in the body parameter of a swiftbar://notify URI aren't converted into spaces.

To Reproduce

open -e 'swiftbar://notify?plugin=01-night.o&title=Night&body=Wallpaper+change+pending%2C+Dock+relaunch+required.&bash=%2Fusr%2Fbin%2Fkillall&param1=Dock&terminal=false&silent=true'

Expected behavior The readme lists a set of “parameters”, implying application/x-www-form-urlencoded syntax, which means that a + should be interpreted as a space:

image

(This screenshot was obtained using the workaround of encoding spaces as %20.)

Screenshots Actual behavior:

image

Environment:

  • macOS version: 12.4
  • SwiftBar version: 1.4.3 (422)

Plugin Example: An empty plugin with the name used in the URI.

Additional Context:

  • [x] I don't run Bartender/Dozer/etc. or tested the issue without it running

fenhl avatar Jul 12 '22 05:07 fenhl