Backslash (\) removed

Post Reply
ebru
Posts: 13
Joined: 13 Jun 2016, 16:11
Name: Ewald Brunmüller
Location: Austria
Company Name: Mr.

Backslash (\) removed

Post by ebru »

In any textfield, backslashes (for example in a Path to a local file) are removed when saving.
It seems to happen in alle types of Textfields and in comments.
User avatar
support
Site Admin
Posts: 6194
Joined: 19 Oct 2014, 18:22
Name: Sergey Kharchishin
Location: Russia, Evpatoriya

Re: Backslash (\) removed

Post by support »

do you use local server for windows?
ebru
Posts: 13
Joined: 13 Jun 2016, 16:11
Name: Ewald Brunmüller
Location: Austria
Company Name: Mr.

Re: Backslash (\) removed

Post by ebru »

Yes. Windows Server with XAMPP
User avatar
support
Site Admin
Posts: 6194
Joined: 19 Oct 2014, 18:22
Name: Sergey Kharchishin
Location: Russia, Evpatoriya

Re: Backslash (\) removed

Post by support »

open file includes/functions/database.php and remove next code

Code: Select all

if (function_exists('mysqli_real_escape_string')) {
    	return mysqli_real_escape_string($$link,stripslashes($string));
    } elseif (function_exists('mysqli_escape_string')) {
    	return mysqli_escape_string($$link,stripslashes($string));
    }
let me know if it helps

and note this will work for Windows Server with XAMPP only
ebru
Posts: 13
Joined: 13 Jun 2016, 16:11
Name: Ewald Brunmüller
Location: Austria
Company Name: Mr.

Re: Backslash (\) removed

Post by ebru »

The solution works.

Nevertheless: my programmer thinks, that it has less to do with XAMPP but with "magic_quotes" and the extensive usage of "addslahes" and "stripslashes", which - to his opinion - do not always do what they are supposed to.

He also notes, that "escaping" is not beeing used generally.
This could lead to SQL-injections.

Note: I am just forwarding, what my programmer told me and do not really understand it. If you have more questions, I will probably ask him, to contact you directly.
User avatar
support
Site Admin
Posts: 6194
Joined: 19 Oct 2014, 18:22
Name: Sergey Kharchishin
Location: Russia, Evpatoriya

Re: Backslash (\) removed

Post by support »

thank you, everything is clear for me:)

since XAMPP is just for local server (for personal use only) so there is no reason to worry about SQL-injections etc.
Post Reply