Ensure decoding an invalid ID with a repeating reserved character does not crash
4kimov opened this issue · comments
Spec has been adjusted to include an additional check: sqids/sqids-spec@f52b578
What happens without that check is that when a reserved character (eg: offset character) is removed from the alphabet during decoding, conversion from ID to number becomes impossible when that same character is once again present in the ID (under normal conditions this never happens during encoding).
The best way to check for this is to try & decode an ID fff
(like in the above link). Please ensure the library tests for that & returns an empty array under these conditions.
Sorry for the delay, I didn't notice this issue. (I just enabled the watch feature to be notified from now on when issues are created here.)
I'll look into this.
@4kimov I need to add a GitHub Actions secret to the repo (for setting up automatic test runs and NuGet pushes) but apparently I don't have the necessary permissions.
This is what the menu in the settings page looks like for me:
This is what it looks like in a repo I own (I need the "Secrets and variables" item):
Could you modify my permissions to enable this?
@aradalvand Sure, done.