swiftbar / SwiftBar

Powerful macOS menu bar customization tool
https://swiftbar.app
MIT License
2.93k stars 92 forks source link

Improper unescaping of notification body #324

Closed fenhl closed 2 years ago

fenhl commented 2 years ago

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:

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

Additional Context: