Hi,
many thanks for your work on this great project and for maintaining it in Debian!
The simplepass authentication method is all I need to restrict access to the upload interface. The only issue is that browsers like Firefox or Chromium don't offer to save the upload password. So users have to find other ways to save the password. I did a little bit of digging and it seems that Firefox and Chromium only offer to save the password if a username input element is supplied in the same form alongside the password input element. As a workaround, I added a dummy username input field that is used for nothing and it worked. I attached the diff. Unfortunately, I didn't check the mailing list. Otherwise, I would have seen the patch from Rowan Thorpe that adds a userpass authentication. I didn't test the patch but it looks like adding only one account with the userpass auth method would solve the issue, too.
Best regards, Wolfgang
--- public/javascripts/coquelicot.auth.simplepass.js | 11 +++++++++++ views/auth/simplepass.haml | 3 +++ 2 files changed, 14 insertions(+)
diff --git a/public/javascripts/coquelicot.auth.simplepass.js b/public/javascripts/coquelicot.auth.simplepass.js index 3fd3626..db4c5f7 100644 --- a/public/javascripts/coquelicot.auth.simplepass.js +++ b/public/javascripts/coquelicot.auth.simplepass.js @@ -30,3 +30,14 @@ var authentication = { $('#upload_password').val(''); }, }; + +$(document).ready(function() { + $('#simplepass-auth-submit').remove(); + var submit = $('<input type="submit" />'); + submit.attr('value', 'Login'); + submit.attr('id', 'simplepass-auth-submit'); + $('#upload-authentication').append( + $('<div class="field" />').append( + $('<div class="submit" />').append( + submit))); +}); diff --git a/views/auth/simplepass.haml b/views/auth/simplepass.haml index 04809e2..8374a83 100644 --- a/views/auth/simplepass.haml +++ b/views/auth/simplepass.haml @@ -16,5 +16,8 @@ -# along with this program. If not, see http://www.gnu.org/licenses/.
.field + %label Upload User: + %input.input{ :type => 'text', :name => 'upload_user' } +.field %label{ :for => 'upload_password' } Upload password: %input.input{ :type => 'password', :id => 'upload_password', :name => 'upload_password' }
Hi Wolfgang!
Wolfgang Wiedmeyer:
The simplepass authentication method is all I need to restrict access to the upload interface. The only issue is that browsers like Firefox or Chromium don't offer to save the upload password. So users have to find other ways to save the password. I did a little bit of digging and it seems that Firefox and Chromium only offer to save the password if a username input element is supplied in the same form alongside the password input element. As a workaround, I added a dummy username input field that is used for nothing and it worked. I attached the diff. Unfortunately, I didn't check the mailing list. Otherwise, I would have seen the patch from Rowan Thorpe that adds a userpass authentication. I didn't test the patch but it looks like adding only one account with the userpass auth method would solve the issue, too.
Coquelicot 0.9.6 has been released containing the userpass authentication method. Could you confirm that it solves your issue?