lat9 / usu

Ultimate SEO URLs for Zen Cart
GNU General Public License v3.0
1 stars 5 forks source link

PHP Fatal error when URL contains an invalid string #51

Closed proseLA closed 1 year ago

proseLA commented 2 years ago

https://github.com/lat9/usu/blob/a0f90a856c269e52864d9d1a85b7bc7fbe9bafb6/includes/classes/usu.php#L714-L715

$single_cid gets cast to an integer. it's then used in the function get_full_path which potentially modifies it, and then is no longer an integer. which then causes the sql down the line to error out.

i'm seeing it in some logs in the real world, when an URL is constructed as so:

https://mysite.com/index.php?main_page=index&cpath=45/myBloodyCategory-c-45/

how a spider or whatever is creating this URL... well you got me... not coming from the site.

but i do not think a constructed URL (however/whoever constructs it) should result in a fatal error.