logout_error( sprintf( _("Preference file, %s, could not be written. Contact your system administrator to resolve this issue.") , $filename . '.tmp') );
exit;
}
}
}
fclose($file);
logout_error( sprintf( _("Preference file, %s, could not be written. Contact your system administrator to resolve this issue.") , $filename . '.tmp') );
exit;
}
}
}
fclose($file);
- @copy($filename . '.tmp',$filename);
+ if (! @copy($filename . '.tmp',$filename) ) {
+ logout_error( sprintf( _("Preference file, %s, could not be copied from temporary file, %s. Contact your system administrator to resolve this issue."), $filename, $filename . '.tmp') );
logout_error( sprintf( _("Signature file, %s, could not be written. Contact your system administrator to resolve this issue.") , $filename . '.tmp'));
exit;
}
fclose($file);
logout_error( sprintf( _("Signature file, %s, could not be written. Contact your system administrator to resolve this issue.") , $filename . '.tmp'));
exit;
}
fclose($file);
- @copy($filename . '.tmp',$filename);
+ if (! @copy($filename . '.tmp',$filename) ) {
+ logout_error( sprintf( _("Signature file, %s, could not be copied from temporary file, %s. Contact your system administrator to resolve this issue."), $filename, $filename . '.tmp') );
+ exit;
+ }
@unlink($filename . '.tmp');
chmod($filename, 0600);
@unlink($filename . '.tmp');
chmod($filename, 0600);
@@ -246,7+250,6 @@ function getSig($data_dir, $username, $number) {
/* Open the file, or else display an error to the user. */
if(!$file = @fopen($filename, 'r'))
{
/* Open the file, or else display an error to the user. */