DIRECTcut / ytb--down

A simple web app to download youtube videos with a URL
0 stars 0 forks source link

Incorrect client-side validation #12

Closed DIRECTcut closed 3 years ago

DIRECTcut commented 3 years ago

Describe the bug Currently the regular expression in isQueryValid allows such strings:

oHg5SJYRHA0)

Expected behavior The function should allow this: oHg5SJYRHA0

butnot this: oHg5SJYRHA0)

Additional Context The regexp should be ^.*[a-zA-Z0-9_-]{11}$ to account for where a string begins and ends.

DIRECTcut commented 3 years ago

Fixed in commit