levelsranks / web-levels_ranks

Adaptive WEB Interface for Levels Ranks statistics plugin
GNU General Public License v3.0
140 stars 100 forks source link

Not complying with RFC 3986 Fix #158

Closed ReDestroyDeR closed 2 years ago

ReDestroyDeR commented 2 years ago

Reloading admin panel after request without any query parameters provided (clear module cache, for example) results in 404 because we're targeting endpoint /adminpanel? instead of /adminpanel

ReDestroyDeR commented 2 years ago

On previous versions this block of code was sending to /adminpanel/? in case of missing query params

ReDestroyDeR commented 2 years ago

PS To my commit. Previously, my code which was executing fine, according to standard and etc. were working fine. Right now it's breaking and requiring me to make this "patches"

I can blame PHP 7.4 or something else, but I don't know any real source of truth here. So let this be a draft right now. Looking forward for feedback

ReDestroyDeR commented 2 years ago

The problem was in the routing mechanism itself. Scraping parameters like /endpoint/?query=something still works, I won't tackle it due to backwards compatability But overall the app should now at least follow query-fragment semantics like /endpoint?query=value#fragment

Waiting for review =)

ReDestroyDeR commented 2 years ago

Not sure about real practicallity of this PR. Will close for now, maybe open after futher inverstigation based on experience