Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Accept trailing slash with peertube auth add #3520

Closed
hopeseekr opened this issue Dec 26, 2020 · 0 comments · Fixed by #3521
Closed

Accept trailing slash with peertube auth add #3520

hopeseekr opened this issue Dec 26, 2020 · 0 comments · Fixed by #3521

Comments

@hopeseekr
Copy link
Contributor

hopeseekr commented Dec 26, 2020

The Problem:

When adding an authorization for the peertube-cli, one must not have anything after the domain_name:port.

prompt: instance url:  https://www.example.com
prompt: username:  hopeseekr
prompt: password:  ************

You MUST NOT have a trailing / in your instance url, or it will always say expected 200 "OK", got 404 "Not Found". It took me over 20 minutes to figure out that this was the problem.

See Issue #3091.

The Solution

It'd be very very helpful for PeerTube to autoremove everything after and including the domain name:port.

I am going to submit a PR for this.

@rigelk rigelk changed the title Feature Request: A More foolproof peertube auth add A More foolproof peertube auth add Dec 26, 2020
@rigelk rigelk changed the title A More foolproof peertube auth add Accept trailing slash with peertube auth add Dec 26, 2020
hopeseekr added a commit to hopeseekr-contribs/PeerTube that referenced this issue Dec 27, 2020
…raneous characters.

**The Solution:**
I have hardened `auth add` by stripping out everything from the third '/' to the end of the instance URL.

**The Problem:**
When adding an authorization for the peertube-cli, before this commit you could not have anything after the domain_name:port.

For instance, if there was a trailing / in your instance URL, before this commit it will always fail with

    expected 200 "OK", got 404 "Not Found".

It took me over 20 minutes to figure out that this was the problem.

See Issue Chocobozzz#3091.
hopeseekr added a commit to hopeseekr-contribs/PeerTube that referenced this issue Dec 27, 2020
…raneous characters.

**The Solution:**
I have hardened `auth add` by stripping out everything from the third '/' to the end of the instance URL.

**The Problem:**
When adding an authorization for the peertube-cli, before this commit you could not have anything after the domain_name:port.

For instance, if there was a trailing / in your instance URL, before this commit it will always fail with

    expected 200 "OK", got 404 "Not Found".

It took me over 20 minutes to figure out that this was the problem.

See Issue Chocobozzz#3091.
hopeseekr added a commit to hopeseekr-contribs/PeerTube that referenced this issue Dec 27, 2020
…raneous characters.

**The Solution:**
I have hardened `auth add` by stripping out everything from the third '/' to the end of the instance URL.

**The Problem:**
When adding an authorization for the peertube-cli, before this commit you could not have anything after the domain_name:port.

For instance, if there was a trailing / in your instance URL, before this commit it will always fail with

    expected 200 "OK", got 404 "Not Found".

It took me over 20 minutes to figure out that this was the problem.

See Issue Chocobozzz#3091.
@rigelk rigelk linked a pull request Dec 27, 2020 that will close this issue
5 tasks
hopeseekr added a commit to hopeseekr-contribs/PeerTube that referenced this issue Dec 27, 2020
…raneous characters.

**The Solution:**
I have hardened `auth add` by stripping out everything from the third '/' to the end of the instance URL.

**The Problem:**
When adding an authorization for the peertube-cli, before this commit you could not have anything after the domain_name:port.

For instance, if there was a trailing / in your instance URL, before this commit it will always fail with

    expected 200 "OK", got 404 "Not Found".

It took me over 20 minutes to figure out that this was the problem.

See Issue Chocobozzz#3091.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants