I had a problem with a form not saving some records to the DB.
I could get to understand that the problem was at single quotes " ' " entered at the form not being escaped before the field got inserted to the DB.
As I´m just a begginer with PHP, I added the following code to chronocontact.php at line 20 and it started working, but I'm sure that a better solution should be handy to those who developed the component.
This also caused my emails getting three \\\ (double addingslashes). By the way I applied a hack to this file, I don't remember what for, but I know I got it in this forum. :?
Anybody knows why would I have ChronoContact listed twice in my Components list? May that be related to the problem?
Lastly, would an upgrade to v.3 fix this ?
Thanks!
Sytem Info:
----------------------------------------------------
Chrono Contact_ 2.5 J1.5 RC3.1
----------------------------------------------------
Safe Mode: Off
Open basedir: None
Display Errors: On
Short Open Tags: On
File Uploads: On
Magic Quotes: On
Register Globals: Off
Output Buffering: Off
Session Save Path: None
Session Auto Start: 0
XML Enabled: Yes
Zlib Enabled: Yes
Disabled Functions: None
Mbstring Enabled: Yes
Iconv Available: Yes
----------------------------------------------------
Database Version: 5.0.51a-community
Database Collation: latin1_swedish_ci
PHP Version: 5.2.5
Web Server: Apache/2.0.63 (Unix) mod_ssl/2.0.63 OpenSSL/0.9.8b mod_auth_passthrough/2.1 mod_bwlimited/1.4
Web Server to PHP interface: cgi
Joomla! Version: Joomla! 1.5.7 Production/Stable [ Wovusani ] 9-September-2008 23:00 GMT
I could get to understand that the problem was at single quotes " ' " entered at the form not being escaped before the field got inserted to the DB.
As I´m just a begginer with PHP, I added the following code to chronocontact.php at line 20 and it started working, but I'm sure that a better solution should be handy to those who developed the component.
$posted = array();
$posted = $_POST;
// HACK by ignacio cavina - problem with unescaped strings store to db
//create array to temporarily grab variables
$input_arr = array();
//grabs the $_POST variables and adds slashes
foreach ($_POST as $key => $input_arr) {
$_POST[$key] = addslashes($input_arr);
}
// END HACK
This also caused my emails getting three \\\ (double addingslashes). By the way I applied a hack to this file, I don't remember what for, but I know I got it in this forum. :?
Anybody knows why would I have ChronoContact listed twice in my Components list? May that be related to the problem?
Lastly, would an upgrade to v.3 fix this ?
Thanks!
Sytem Info:
----------------------------------------------------
Chrono Contact_ 2.5 J1.5 RC3.1
----------------------------------------------------
Safe Mode: Off
Open basedir: None
Display Errors: On
Short Open Tags: On
File Uploads: On
Magic Quotes: On
Register Globals: Off
Output Buffering: Off
Session Save Path: None
Session Auto Start: 0
XML Enabled: Yes
Zlib Enabled: Yes
Disabled Functions: None
Mbstring Enabled: Yes
Iconv Available: Yes
----------------------------------------------------
Database Version: 5.0.51a-community
Database Collation: latin1_swedish_ci
PHP Version: 5.2.5
Web Server: Apache/2.0.63 (Unix) mod_ssl/2.0.63 OpenSSL/0.9.8b mod_auth_passthrough/2.1 mod_bwlimited/1.4
Web Server to PHP interface: cgi
Joomla! Version: Joomla! 1.5.7 Production/Stable [ Wovusani ] 9-September-2008 23:00 GMT