1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2026-02-10 16:01:33 +00:00

Merge branch 'master' into hookhead

Conflicts:
	include/functions.php

changes for conflicts with master
This commit is contained in:
justauser
2013-07-07 13:57:06 -04:00
10 changed files with 83 additions and 33 deletions

View File

@@ -2578,8 +2578,10 @@
}
}
$content_query_part = "content, content AS content_preview, cached_content, ";
if (is_numeric($feed)) {
if ($feed >= 0) {
@@ -3784,7 +3786,7 @@
* @return string Absolute URL
*/
function rewrite_relative_url($url, $rel_url) {
if (strpos($rel_url, "magnet:") === 0) {
if (strpos($rel_url, ":") !== false) {
return $rel_url;
} else if (strpos($rel_url, "://") !== false) {
return $rel_url;
@@ -3954,6 +3956,7 @@
$reg_qpart = "REGEXP";
foreach ($filter["rules"] AS $rule) {
$rule['reg_exp'] = str_replace('/', '\/', $rule["reg_exp"]);
$regexp_valid = preg_match('/' . $rule['reg_exp'] . '/',
$rule['reg_exp']) !== FALSE;

View File

@@ -62,11 +62,17 @@
return false;
}
if ($_SESSION["ref_schema_version"] != session_get_schema_version(true))
if ($_SESSION["ref_schema_version"] != session_get_schema_version(true)) {
$_SESSION["login_error_msg"] =
__("Session failed to validate (schema version changed)");
return false;
}
if (sha1($_SERVER['HTTP_USER_AGENT']) != $_SESSION["user_agent"])
if (sha1($_SERVER['HTTP_USER_AGENT']) != $_SESSION["user_agent"]) {
$_SESSION["login_error_msg"] =
__("Session failed to validate (user agent changed)");
return false;
}
if ($_SESSION["uid"]) {
$result = Db::get()->query(
@@ -74,11 +80,19 @@
// user not found
if (Db::get()->num_rows($result) == 0) {
$_SESSION["login_error_msg"] =
__("Session failed to validate (user not found)");
return false;
} else {
$pwd_hash = Db::get()->fetch_result($result, 0, "pwd_hash");
if ($pwd_hash != $_SESSION["pwd_hash"]) {
$_SESSION["login_error_msg"] =
__("Session failed to validate (password changed)");
return false;
}
}