* Do an xlat for general_accounting_attrs_file and general_user_edit_attrs_file. That way we can
have different mappings for each administrator.
* Add postgresql specific sql schema by apellido jr., wilfredo p. Move each sql schema to a
separate directory (mysql and postgresql)
* Change is_int to is_numeric. This closes Bug #90
+* Escape special characters in the sql password. This closes bug #96
+* Do an xlat for general_accounting_attrs_file and general_user_edit_attrs_file. That way we can
+ have different mappings for each administrator.
Ver 1.70:
* Add the /bin postgresql compatibility patch from Guy Fraser
* Add ldap_userdn as a configuration directive. If set we use that for
die "Could not find sql binary. Please make sure that the \$sqlcmd variable points to the right location\n" if (! -x $sqlcmd);
$sql_password = ($sql_password eq '') ? '' : "-p$sql_password";
+$sql_password =~ s/(\W)/\\$1/g;
($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime;
$date = POSIX::strftime("%Y-%m-%d %T",$sec,$min,$hour,($mday - $back_days),$mon,$year,$wday,$yday,$isdst);
$realm_del = '@' if ($realm_del eq '');
$realm_for = 'suffix' if ($realm_for eq '');
$pass = ($sql_password ne '') ? "-p$sql_password" : '';
+$pass =~ s/(\W)/\\$1/g;
die "SQL server not defined\n" if ($sql_server eq '');
die "sql_command directive is not set in admin.conf\n" if ($sqlcmd eq '');
die "Could not find sql binary. Please make sure that the \$sqlcmd variable points to the right location\n" if (! -x $sqlcmd);
$sql_password = ($sql_password == '') ? '' : "-p$sql_password";
+$sql_password =~ s/(\W)/\\$1/g;
($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime;
if ($mday == 1){
die "Could not find sql binary. Please make sure that the \$sqlcmd variable points to the right location\n" if (! -x $sqlcmd);
$sql_password = ($sql_password == '') ? '' : "-p$sql_password";
+$sql_password =~ s/(\W)/\\$1/g;
($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime;
$date_start = POSIX::strftime("%Y-%m-%d %T",0,0,0,($mday - 1),$mon,$year,$wday,$yday,$isdst);
die "Could not find sql binary. Please make sure that the \$sqlcmd variable points to the right location\n" if (! -x $sqlcmd);
$sql_password = ($sql_password eq '') ? '' : "-p$sql_password";
+$sql_password =~ s/(\W)/\\$1/g;
($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime;
$date = POSIX::strftime("%Y-%m-%d %T",$sec,$min,$hour,($mday - $back_days),$mon,$year,$wday,$yday,$isdst);
<?php
+include_once('../lib/xlat.php3');
#Read user_edit attribute map
if (!isset($show_attrs)){
- $ARR = file($config[general_user_edit_attrs_file]);
+ $infile = xlat($config[general_user_edit_attrs_file],$login,$config);
+ $ARR = file($infile);
foreach($ARR as $val){
$val=chop($val);
if (ereg('^[[:space:]]*#',$val) || ereg('^[[:space:]]*$',$val))
session_register('show_attrs');
}
if (!isset($acct_attrs) && isset($config[general_accounting_attrs_file])){
- $ARR = file($config[general_accounting_attrs_file]);
+ $infile = xlat($config[general_accounting_attrs_file],$login,$config);
+ $ARR = file($infile);
foreach ($ARR as $val){
$val=chop($val);
if (ereg('^[[:space:]]*#',$val) || ereg('^[[:space:]]*$',$val))