HikaShop / hikapi

HikAPI for Joomla!
GNU General Public License v2.0
4 stars 1 forks source link

urlencode doesn't work #1

Closed onereik closed 11 months ago

onereik commented 5 years ago

Hello,

I just noticed the URL encode doesn't work, for example, if I am getting a variable value of a password and since passwords could include special characters, the string has to be urlencod-ed in that matter, it returns invalid request.

obsidev commented 5 years ago

Hello,

Would it be possible to have more details about the context ? Being able to reproduce the issue will help us to understand and provide the most appropriate fix.

For what I can see right now, sending the data in the POST with a "json encode" do not generate issues with the decode and do not require to perform a urlencode/urldecode ; even if there are special characters because they are handle by the JSON encoding. So, having more details about your usage will definitively help

obsidev commented 5 years ago

Okay ! Thanks for the context

So, I suppose that you want to modify the line 147 of the HikApiHelper https://github.com/HikaShop/hikapi/blob/master/plg_system_hikapi/hikapihelper.php#L147 And have instead : $params[$name] = urldecode($matches[$key + 1]);

Regards,