merged stable

This commit is contained in:
following
2013-03-24 23:07:22 +01:00
10 changed files with 62 additions and 11 deletions

View File

@@ -11,6 +11,7 @@ class RSSParser {
* @return string $item feeditems as HTML-string
*/
public static function parse($items,$url) {
global $translate;
if ($items <= 0)
return '';
@@ -28,7 +29,7 @@ class RSSParser {
$html .= '<div class="newsblock">';
// get xml-data
$data = file_get_contents($url);
$data = @file_get_contents($url);
// check data
if($data === false || strpos($data, 'rss version=') === false) {
@@ -75,7 +76,7 @@ class RSSParser {
if(!$error) {
return $html;
} else {
return '';
return '<p><em>' . $translate->t('currently not available','','',0) . '</em></p>';
}
}
}

View File

@@ -70,14 +70,18 @@ function cracklib_checkpw($pw, $addwords)
// $pw may not contain one of $addwords[]
foreach ($wordlist AS $v)
if (mb_strpos($pw_lc, $v) !== false)
if (mb_stripos($pw_lc, $v) !== false)
return false;
// one of $addwords[] may not contain $pw
foreach ($wordlist AS $v)
if (mb_strpos($v, $pw_lc) !== false)
if (mb_stripos($v, $pw_lc) !== false)
return false;
// words from pw library are not allowed
if (sql_value("SELECT COUNT(*) FROM `pw_dict` WHERE `pw`='&1'", 0, $pw))
return false;
if ($opt['logic']['cracklib'] == true)
{
// load cracklib

View File

@@ -157,7 +157,7 @@ class user
if (!mb_ereg_match(REGEX_PASSWORD, $value))
return false;
if (cracklib_checkPW($value, array('open', 'caching', $this->getUsername(), $this->getFirstName(), $this->getLastName())) == false)
if (cracklib_checkPW($value, array('open', 'caching', 'cache', $this->getUsername(), $this->getFirstName(), $this->getLastName())) == false)
return false;
$pwmd5 = md5($value);