fasheng / elfeed-protocol

Provide extra protocols to make like Fever, NewsBlur, Nextcloud/ownCloud News and Tiny Tiny RSS work with elfeed
GNU General Public License v3.0
100 stars 18 forks source link

Nextcloud password read from shell is base64 encoded with a newline #48

Closed apiraino closed 3 years ago

apiraino commented 3 years ago

Hello,

when the password is read from a shell-command-to-string newlines still seems to be present. Example:

  (setq elfeed-feeds '(
                     ("owncloud+https://user@myhost.com"
                      :password (shell-command-to-string "pass logins/nextcloud | head -n1"))

Issue #30 leads me to a workaround to remove the newline when the base64 for authentication is created:

  (setq elfeed-feeds '(
                     ("owncloud+https://user@myhost.com"
                      :password (shell-command-to-string "echo -n `pass logins/nextcloud | head -n1`"))

I wonder if this is something elfeed-protocol should take care of, or my workaround is the correct fix.

Thank you for elfeed-protocol!!

System info:

fasheng commented 3 years ago

Thanks your report. How about use (password-store-get "logins/nextcloud") instead? I will update the demo code about shell-command-to-string as you did later.

apiraino commented 3 years ago

thank you for the quick reply. Your suggestion makes great sense but I prefer using the shell as I don't need to access often my keyring from emacs, therefore I don't have password-store.el installed.

thank you again for elfeed-protocol, it's a great addition to elfeed!