Updated useragent to Github URL

pull/703/head^2
TimZ99 2019-02-08 16:29:47 +01:00
parent 326eddd97d
commit 9cdafc9554
No known key found for this signature in database
GPG Key ID: 4D8268DC68E8339D
1 changed files with 3 additions and 1 deletions

View File

@ -392,7 +392,7 @@ function psm_curl_get($href, $header = false, $body = true, $timeout = null, $ad
} }
if ($add_agent) { if ($add_agent) {
curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (compatible; phpservermon/'.PSM_VERSION.'; +http://www.phpservermonitor.org)'); curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (compatible; phpservermon/'.PSM_VERSION.'; +https://github.com/phpservermon/phpservermon)');
} }
$result = curl_exec($ch); $result = curl_exec($ch);
@ -744,6 +744,7 @@ function psm_no_cache() {
* @return string * @return string
* @author Pavel Laupe Dvorak <pavel@pavel-dvorak.cz> * @author Pavel Laupe Dvorak <pavel@pavel-dvorak.cz>
*/ */
// TODO change to working function
function psm_password_encrypt($key, $password) function psm_password_encrypt($key, $password)
{ {
if (empty($password)) { if (empty($password)) {
@ -754,6 +755,7 @@ function psm_password_encrypt($key, $password)
throw new \InvalidArgumentException('invalid_encryption_key'); throw new \InvalidArgumentException('invalid_encryption_key');
} }
// TODO rewrite
$iv = mcrypt_create_iv( $iv = mcrypt_create_iv(
mcrypt_get_iv_size(MCRYPT_RIJNDAEL_128, MCRYPT_MODE_CBC), mcrypt_get_iv_size(MCRYPT_RIJNDAEL_128, MCRYPT_MODE_CBC),
MCRYPT_DEV_URANDOM MCRYPT_DEV_URANDOM