mirror of
https://gitlab.com/davical-project/davical.git
synced 2026-11-29 08:56:03 +00:00
escape version string to prevent XSS for sure
* HTML escape the remotely retrieved version string printed to the HTML in order to prevent and attacks (if this would have been possible at all in 12 characters). The version string read from the davical.org webserver might be changed by an attacker in order to perform XSS. Even though this is highly unlikley (there are only 12 characters used) it's better to HTML escape any such string that is printed to HTML. This was originally reported at: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=703290
This commit is contained in:
1 parent
4ef8dc9d53
commit
5fccb302a8
3 files changed
+5
-2
No files matched your search
+1
-1
@@ -252,7 +252,7 @@ function check_davical_version() {
|
||||
$url = 'http://www.davical.org/current_davical_version?v='.$c->version_string;
|
||||
$version_file = @fopen($url, 'r');
|
||||
if ( ! $version_file ) return new CheckResult( false, translate("Could not retrieve") . " '$url'", 'dep_warning' );
|
||||
$current_version = trim(fread( $version_file,12));
|
||||
$current_version = htmlentities( trim(fread( $version_file,12)) );
|
||||
fclose($version_file);
|
||||
$result = new CheckResult($c->version_string == $current_version);
|
||||
if ( ! $result->getOK() ) {
|
||||
|
||||
Reference in new issue
Block a user