Allow using a selfoss instance protected by http basic auth #142

Closed
opened 2023-04-23 13:32:03 +00:00 by yareckon · 4 comments

Prerequisites

  • [ see below ] Are you running the latest version?
  • [ X] Did you check for an existing issue ?
  • [ X] Are you reporting to the correct repository?
  • [ X] Did you perform a cursory search?
  • [X ] Did you read the CONTRIBUTING guide ?

Description

Allow using a selfoss instance protected by http basic auth.

Steps to Reproduce

  1. Protect your selfoss instance with http basic auth, in order to trust your webserver security rather than your rss reader's login security.
  2. Put in a https://login:password@example.com URL for your selfoss instance in the app.

Expected behavior: The android app attempts to connect, sending the appropriate basic auth header with it's HTTP(s) request.
Actual behavior: The URL for the instance is declared invalid. Connecting to the instance is not possible.

For those tempted to suggest I try to "has login" toggle, that is for attempting to use the Selfoss webapp-API login (as expected) rather than trying to use http basic authentication against the webserver.

Screenshots (optional)

...

Device

  • Device Samsung Galaxy A5 2017
  • OS (Android 11, Lineage OS)
  • App version Fdroid Version 123041021-github (123041021) Added to f-droid on 2023-04-15
### Prerequisites * [ see below ] Are you running the latest version? * [ X] Did you check for an existing issue ? * [ X] Are you reporting to the correct repository? * [ X] Did you perform a cursory search? * [X ] Did you read the `CONTRIBUTING` guide ? ### Description Allow using a selfoss instance protected by http basic auth. ### Steps to Reproduce 1. Protect your selfoss instance with http basic auth, in order to trust your webserver security rather than your rss reader's login security. 2. Put in a https://login:password@example.com URL for your selfoss instance in the app. **Expected behavior:** The android app attempts to connect, sending the appropriate basic auth header with it's HTTP(s) request. **Actual behavior:** The URL for the instance is declared invalid. Connecting to the instance is not possible. For those tempted to suggest I try to "has login" toggle, that is for attempting to use the Selfoss webapp-API login (as expected) rather than trying to use http basic authentication against the webserver. ### Screenshots (optional) `...` ### Device - Device Samsung Galaxy A5 2017 - OS (Android 11, Lineage OS) - App version Fdroid Version 123041021-github (123041021) Added to f-droid on 2023-04-15
Owner

Hi @yareckon,

I'll look into making the https://login:password@example.com format valid for the login page.

Having another toggle with two other inputs for the HTTP login and HTTP password would be too much code for something that would be simply doable via the url format.

Thanks for the report.

Hi @yareckon, I'll look into making the `https://login:password@example.com` format valid for the login page. Having another toggle with two other inputs for the HTTP login and HTTP password would be too much code for something that would be simply doable via the url format. Thanks for the report.
Owner

This should be available in the next release. It should be available in here in a few minutes, and on f-droid in some times.

This should be available in the next release. It should be available in here in a few minutes, and on f-droid in some times.
Author

Hi @AmineL , this is mostly working, and has been for months, thank you! I had an issue with this last week when I changed my password to have a number in it. I've read the code and see that you have used \D regex to match the username and password in the URL. \D won't match digits! Maybe you could try \w to match all word characters?

Hi @AmineL , this is mostly working, and has been for months, thank you! I had an issue with this last week when I changed my password to have a number in it. I've read the code and see that you have used \D regex to match the username and password in the URL. \D won't match digits! Maybe you could try \w to match all word characters?
yareckon reopened this issue 2024-03-12 23:44:22 +00:00
Owner

Hey @yareckon, thanks for the bug report.

The apk fixing this issue is available here

Hey @yareckon, thanks for the bug report. The apk fixing this issue is available [here](https://gitea.amine-bouabdallaoui.fr/Louvorg/ReaderForSelfoss-multiplatform/releases/tag/v124030731)
Sign in to join this conversation.
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: Louvorg/ReaderForSelfoss-multiplatform#142
No description provided.