ring-clojure / ring-codec

Utility library for encoding and decoding data
MIT License
63 stars 30 forks source link

Only decode hexadecimal percent codes #39

Closed henrikblomkvist closed 1 year ago

henrikblomkvist commented 1 year ago

The percent codes are hexadecimal so we can ignore any letters other than a-f. Any letter aside from these would cause a NumberFormatException when attempting to decode them.

weavejester commented 1 year ago

I believe that was intentional; to raise an exception when there was an invalid percent code.

henrikblomkvist commented 1 year ago

I believe that was intentional; to raise an exception when there was an invalid percent code.

Aha ok, I saw the suggestion in #7 and didn't see anything further about it, so assumed this had been missed in the following PR. That Pr seemed to only fix 1/3 of the issue URLs raised.

weavejester commented 1 year ago

Ah, you're correct. Given #8, it makes sense to merge this, as the intent is the same.

weavejester commented 1 year ago

Can you update the commit message to:

Ensure only hexadecimal percent codes are decoded

This continues the intent of #8, and ensures that only hexadecimal
percent codes are decoded, with anything else ignored.

I think it makes sense to mention #8 for future reference.

henrikblomkvist commented 1 year ago

Can you update the commit message to:

Ensure only hexadecimal percent codes are decoded

This continues the intent of #8, and ensures that only hexadecimal
percent codes are decoded, with anything else ignored.

I think it makes sense to mention #8 for future reference.

Ok, thanks, that's sorted now.

weavejester commented 1 year ago

Thanks!