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

fix: use port for http login and allow custom URL #606

Merged
merged 7 commits into from
Nov 29, 2023

Conversation

Costallat
Copy link
Collaborator

@Costallat Costallat commented Oct 27, 2023

Description

When using the HTTP login it is not using the port field, so we had to add the port on the IP address, with this change it will now get the port from the port field that we have on the login screen.

Updated code to also allow custom login URLs.

Behavior

Actual

Doesn't use the port field when making logon through HTTP.
Doesn't allow to customize the login URL, always append login.php on the URL.

Expected

Use the port specified on the port field.
Allow customized URL, 'myserver.com/api/login/endpoint', will be 'myserver.com:/api/login/endpoint'

Fixes

Start to use the port field and avoid that we have to add the port together with the IP/URL of the server. Also make the default port if not specified the port 80, the default HTTP port.

Allow to have customized login URLs.

# (issue)

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested

Tested removing the port fro the IP address and added it to the port field. Also saw that when not setting the port it is using the port 80.

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I checked the PR checks reports
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works

@majestyotbr majestyotbr changed the title Fix http login not using the port field fix: port field on http login Oct 31, 2023
Renato Foot added 7 commits November 1, 2023 03:27
investigating more details to improve the fix

Signed-off-by: Renato Foot <renato@foot.br>
Signed-off-by: Renato Foot <renato@foot.br>
Signed-off-by: Renato Foot <renato@foot.br>
Signed-off-by: Renato Foot <renato@foot.br>
Remove hard coded login.php from URL to allow custom URLs.

Signed-off-by: Renato Foot <renato@foot.br>
Fix to split the URL without the port and append the port on the right
place.

Signed-off-by: Renato Foot <renato@foot.br>
- Get full URL path
- Check and accept URL without port

Signed-off-by: Renato Foot <renato@foot.br>
@Costallat Costallat force-pushed the fix-http-login-port-not-being-used branch from 96d7eb6 to 930610e Compare November 1, 2023 03:28
@Costallat Costallat changed the title fix: port field on http login fix: make http login use the port field and also allow to specify a custom login URL Nov 1, 2023
@dudantas dudantas changed the title fix: make http login use the port field and also allow to specify a custom login URL fix: use port for http login and allow custom URL Nov 1, 2023
@Piksel91

This comment was marked as off-topic.

@Costallat

This comment was marked as resolved.

@Piksel91

This comment was marked as off-topic.

@Costallat

This comment was marked as resolved.

@Piksel91

This comment was marked as off-topic.

@Costallat

This comment was marked as resolved.

@Piksel91

This comment was marked as resolved.

@Piksel91

This comment was marked as resolved.

@Costallat

This comment was marked as resolved.

@Piksel91

This comment was marked as resolved.

@Costallat

This comment was marked as resolved.

@Costallat Costallat merged commit 8c3d8fc into mehah:main Nov 29, 2023
10 checks passed
@Costallat Costallat deleted the fix-http-login-port-not-being-used branch November 29, 2023 01:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants