ajayyy / DeArrow

Crowdsourcing better titles and thumbnails on YouTube
https://dearrow.ajay.app
GNU General Public License v3.0
1.35k stars 39 forks source link

Redeem license requests invalid url #141

Closed jakewilson closed 1 year ago

jakewilson commented 1 year ago

Attempting to redeem a license makes a request to

https://sponsor.ajay.apphttps//dearrow.ajay.app/api/verifyToken

This is because in requests.ts line 6 we append the url to the config serverAddress where serverAddress is https://sponsor.ajay.app and url is https://dearrow.ajay.app (set in PaymentComponent.tsx line 8).

If you make this request once, nothing will happen but, weirdly enough, if you enter anything in the license box (like hi) and click 'Redeem' 3 or 4 times, after waiting for the connection to timeout I can get a successful validation, even with an invalid key.

ajayyy commented 1 year ago

Ah, oops. I guess it was working before because it fail-safes by allowing the key if the server responds with a non 200 status code, which was happening with this invalid url.

I'm not sure exactly why the fail-safe didn't work for you, but making the behavior properly probably should fix it anyway

ajayyy commented 1 year ago

I guess it could be your dns resolver behaving in a different way, since this could be causing it to send a request on a non existent top level domain