Bug 410622 - Don't automatically create shortcut when Arguments are malformed
Summary: Don't automatically create shortcut when Arguments are malformed
Status: REPORTED
Alias: None
Product: Snoretoast
Classification: Frameworks and Libraries
Component: general (other bugs)
Version First Reported In: unspecified
Platform: Other Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: Hannah von Reth
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-08-05 18:19 UTC by Thomas
Modified: 2019-08-05 18:19 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas 2019-08-05 18:19:08 UTC
SUMMARY
When the supplied Snoretoast-Arguments are malformed (because of an error in the supplying app) and the appID therefore can't be obtained, the default shortcut is installed. Also if the -close argument is used without appID, the shortcut is installed. For sure an app shouldn't supply malformed arguments, but developers forget stuff and installing a shortcut is something someone doesn't want to do unintentionaly.

I don't know how to fix this best, but I suggest heavily restricting the cases when a shortcut is created without -install beeing called explicitly or forcing the explicit usage of -install (without arguments) even for usage without an own appID. Also checking the supplied arguments for unknown attributes or unbalanced quotes before installing the shortcut would be great.

STEPS TO REPRODUCE
Some examples:
*) snoretoast.exe -t Hello -m World -b "1;2;3_missing_end_quote -appID "com.example"
*) snoretoast.exe -close -id a //missing appID installs Shortcut

OBSERVED RESULT
A shortcut is installed and in most cases a error-message is thrown.

EXPECTED RESULT
An error-message is thrown and the app exits.