bahnzumberg / zuugle-api

Public repositority for backend components of www.zuugle.at
https://www.zuugle.at
GNU General Public License v3.0
2 stars 3 forks source link

Fix code scanning alert - Type confusion through parameter tampering #14

Closed martinheppner closed 8 months ago

martinheppner commented 1 year ago

Tracking issue for:

Falsal commented 8 months ago

this tpe is definitly a string and in order to remove the alert , we can stringify the domain variable before passing it the method (indexOf)

Falsal commented 8 months ago

makes no sense to stringify "domain" , instead I added a type control else return a "AT" as a default value. In any case, this function is not being used currently but should replace a boilerplate code inside routes/ranges