From 8a131b056ee3566c2b54466f650c26c143b7c369 Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Sun, 14 Jun 2015 16:22:33 +0200 Subject: Force autocomplete off https://github.com/FreshRSS/FreshRSS/issues/880 Put a space in the user field instead of empty to avoid autocomplete. Use feed ID in the username/password field name. --- app/Controllers/feedController.php | 6 +++--- app/Controllers/subscriptionController.php | 6 +++--- app/views/feed/add.phtml | 2 +- app/views/helpers/feed/update.phtml | 8 ++++---- app/views/subscription/index.phtml | 4 ++-- 5 files changed, 13 insertions(+), 13 deletions(-) diff --git a/app/Controllers/feedController.php b/app/Controllers/feedController.php index 957a809cd..b91f63b5b 100755 --- a/app/Controllers/feedController.php +++ b/app/Controllers/feedController.php @@ -98,10 +98,10 @@ class FreshRSS_feed_Controller extends Minz_ActionController { // HTTP information are useful if feed is protected behind a // HTTP authentication - $user = Minz_Request::param('http_user'); - $pass = Minz_Request::param('http_pass'); + $user = trim(Minz_Request::param('http_user', '')); + $pass = Minz_Request::param('http_pass', ''); $http_auth = ''; - if ($user != '' || $pass != '') { + if ($user != '' && $pass != '') { //TODO: Sanitize $http_auth = $user . ':' . $pass; } diff --git a/app/Controllers/subscriptionController.php b/app/Controllers/subscriptionController.php index 333565faf..03d3ee15e 100644 --- a/app/Controllers/subscriptionController.php +++ b/app/Controllers/subscriptionController.php @@ -77,11 +77,11 @@ class FreshRSS_subscription_Controller extends Minz_ActionController { Minz_View::prependTitle(_t('sub.title.feed_management') . ' · ' . $this->view->feed->name() . ' · '); if (Minz_Request::isPost()) { - $user = Minz_Request::param('http_user', ''); - $pass = Minz_Request::param('http_pass', ''); + $user = trim(Minz_Request::param('http_user_feed' . $id, '')); + $pass = Minz_Request::param('http_pass_feed' . $id, ''); $httpAuth = ''; - if ($user != '' || $pass != '') { + if ($user != '' && $pass != '') { //TODO: Sanitize $httpAuth = $user . ':' . $pass; } diff --git a/app/views/feed/add.phtml b/app/views/feed/add.phtml index 4cdd3f390..35f6fbb12 100644 --- a/app/views/feed/add.phtml +++ b/app/views/feed/add.phtml @@ -67,7 +67,7 @@
- +
diff --git a/app/views/helpers/feed/update.phtml b/app/views/helpers/feed/update.phtml index b2cf9f93c..12f485ec3 100644 --- a/app/views/helpers/feed/update.phtml +++ b/app/views/helpers/feed/update.phtml @@ -144,15 +144,15 @@ feed->httpAuth(false); ?>
- +
- +
- +
- +
diff --git a/app/views/subscription/index.phtml b/app/views/subscription/index.phtml index 331e8244e..2cfe3f33c 100644 --- a/app/views/subscription/index.phtml +++ b/app/views/subscription/index.phtml @@ -36,10 +36,10 @@
  • - +
  • - +
  • -- cgit v1.2.3