Skip to content

Commit 27775f0

Browse files
committed
More securely parse the version - fixes #161
1 parent b644475 commit 27775f0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

library/ViMbAdmin/Version.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ public static function getLatest()
9595
$handle = fopen( 'http://www.opensolutions.ie/open-source/vimbadmin/latest-v3', 'r' );
9696
if( $handle !== false )
9797
{
98-
self::$_lastestVersion = trim( stream_get_contents( $handle ) );
98+
self::$_lastestVersion = preg_replace( "/[^0-9\.]/", "", trim( stream_get_contents( $handle, 12 ) ) );
9999
fclose( $handle );
100100
}
101101
}

0 commit comments

Comments
 (0)