aboutsummaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorGravatar Marien Fressinaud <dev@marienfressinaud.fr> 2014-09-17 14:21:56 +0200
committerGravatar Marien Fressinaud <dev@marienfressinaud.fr> 2014-09-17 14:21:56 +0200
commitfc7d2a0bf271e43a9e6001dccef61ec0762eb840 (patch)
tree3b59047da35e6acca85d0e0831f3e8951e11402f /app
parent75bf305b2f084958d43689b3781d03a29cc21f60 (diff)
Move http referer test into lib_rss
Rename method (coding style) Change in app/FreshRSS.php Improve test of app/install.php
Diffstat (limited to 'app')
-rw-r--r--app/FreshRSS.php2
-rw-r--r--app/install.php2
2 files changed, 2 insertions, 2 deletions
diff --git a/app/FreshRSS.php b/app/FreshRSS.php
index 6cca27f78..347b8392f 100644
--- a/app/FreshRSS.php
+++ b/app/FreshRSS.php
@@ -6,7 +6,7 @@ class FreshRSS extends Minz_FrontController {
}
$loginOk = $this->accessControl(Minz_Session::param('currentUser', ''));
$this->loadParamsView();
- if (Minz_Request::isPost() && !Minz_Request::isRefererFromSameDomain()) {
+ if (Minz_Request::isPost() && !is_referer_from_same_domain()) {
$loginOk = false; //Basic protection against XSRF attacks
Minz_Error::error(
403,
diff --git a/app/install.php b/app/install.php
index f31764545..362ffec48 100644
--- a/app/install.php
+++ b/app/install.php
@@ -307,7 +307,7 @@ function checkStep1() {
$log = LOG_PATH && is_writable(LOG_PATH);
$favicons = is_writable(DATA_PATH . '/favicons');
$persona = is_writable(DATA_PATH . '/persona');
- $http_referer = !empty($_SERVER['HTTP_REFERER']);
+ $http_referer = is_referer_from_same_domain();
return array(
'php' => $php ? 'ok' : 'ko',