Firefly III: a personal finances manager
PHP accountingbudgetbudgetingbudgetscash-flowcashflowcredit-carddockerexpensesfinancefinancesfinanciallinuxmoneypaycheckpersonal-financephpphp7
Fixed a bug where the referer might not be picked up correctly.
James Colef89aee37f5e7
diff --git a/app/controllers/HomeController.php b/app/controllers/HomeController.phpindex 64169899b9..f0d6c35651 100644--- a/app/controllers/HomeController.php+++ b/app/controllers/HomeController.php@@ -90,9 +90,16 @@ class HomeController extends BaseControllerpublic function sessionNext(){Navigation::next();- if (isset($_SERVER['HTTP_REFERER']) && (!strpos($_SERVER['HTTP_REFERER'], Config::get('app.url')) === false)) {+ $strPosition = strpos($_SERVER['HTTP_REFERER'], Config::get('app.url'));+ Log::debug('HTTP_REFERER is: ' . $_SERVER['HTTP_REFERER']);+ Log::debug('App.url = ' . Config::get('app.url'));+ Log::debug('strpos() = ' . Steam::boolString($strPosition));++ if (isset($_SERVER['HTTP_REFERER']) && $strPosition === 0) {+ Log::debug('Redirect back');return Redirect::back();} else {+ Log::debug('Redirect intended');return Redirect::intended();}@@ -104,10 +111,17 @@ class HomeController extends BaseControllerpublic function sessionPrev(){Navigation::prev();+ $strPosition = strpos($_SERVER['HTTP_REFERER'], Config::get('app.url'));+ Log::debug('HTTP_REFERER is: ' . $_SERVER['HTTP_REFERER']);+ Log::debug('App.url = ' . Config::get('app.url'));+ Log::debug('strpos() = ' . Steam::boolString($strPosition));- if (isset($_SERVER['HTTP_REFERER']) && (!strpos($_SERVER['HTTP_REFERER'], Config::get('app.url')) === false)) {++ if (isset($_SERVER['HTTP_REFERER']) && $strPosition === 0) {+ Log::debug('Redirect back');return Redirect::back();} else {+ Log::debug('Redirect intended');return Redirect::intended();}}