bellini13 Posted April 30, 2014 Share Posted April 30, 2014 Can you please provide an explanation as to why base64_encode function is forbidden? What function should be used instead? 1 Link to comment Share on other sites More sharing options...
Xavier du Tertre Posted April 30, 2014 Share Posted April 30, 2014 Hey, It's a matter of security. We're had really bad contributions hidden behind a base64 before and we don't want this kind of encoded module to be validated automatically. What function should be used instead? It depends on what you're developing. Link to comment Share on other sites More sharing options...
bellini13 Posted April 30, 2014 Author Share Posted April 30, 2014 In my situation, I base64 encode a string so the string can be appended to the end of a URL. Using URL encoding is not desirable here, since I am looking to mask the string from a standard end user, and it also drastically shortens the string value, bypassing GET length limitations. The string is then base64_decoded within the template and displayed to the end user when the page is rendered. Usually Prestashop will have a Tools function that they want you to use instead, but in this case no alternative is provided. Link to comment Share on other sites More sharing options...
ExpertoPrestaShop Posted October 13, 2016 Share Posted October 13, 2016 Hello: Did you find a solution for this issue?? Thanks. Regards Link to comment Share on other sites More sharing options...
bellini13 Posted October 15, 2016 Author Share Posted October 15, 2016 In my case, I removed the usage of base64 and took an alternatively route for displaying the message. Link to comment Share on other sites More sharing options...
ExpertoPrestaShop Posted October 15, 2016 Share Posted October 15, 2016 Of course, but that's now your initial question. Your initial question was why this function is forbidden, and the most important, what alternative exists? You can change it because it was your personal development. But, what to do when you receive a base64 encoded string from a third party and you must decoded?? Is there any alternative solution that Prestashop accept?? Regards Link to comment Share on other sites More sharing options...
ExpertoPrestaShop Posted October 15, 2016 Share Posted October 15, 2016 Thanks for your advice. I'm not using it for encryption. Is a third party system requirement. I will write a note when I submit my module to Addons. Regards Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now