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

Authentication to QRZ.com should be done over POST with form data. #389

Closed
ericmoritz opened this issue Jun 9, 2024 · 2 comments
Closed
Labels
enhancement New feature or request

Comments

@ericmoritz
Copy link

url.setQuery(query);

Hi, I was writing an application to query callsigns using xmldata.qrz.com. While reading the docs I saw that they suggest using a query string for the username and password. This is considered a bad practice because it potentially leaks the account's password in logs and other intermediaries likes caches and proxies.

https://owasp.org/www-community/vulnerabilities/Information_exposure_through_query_strings_in_url

The good news is that they support making requests over POST using application/x-www-form-urlencoded. I would recommend making requests using POST to remove the potential that a person's application password might leak between qlog and xmldata.qrz.com.

Sample request:

POST /xml/current/
Host: xmldata.qrz.com
Content-Type: application/x-www-form-urlencoded

username=xx1xxx;password=abcdef;agent=q5.0

The risk is probably low because they're using HTTPS and query strings are not visible to intermediaries as long as TLS is active. Though any intermediary proxy between TLS termination and the API service will see the password in the query string. Not knowing how the URL might be logged makes me nervous, so I'd recommend switching the POST whenever possible to mitigate this risk.

@foldynl
Copy link
Owner

foldynl commented Jun 9, 2024

Thanks for the warning. I'm glad that someone audits the code from the point of view of security as well.

@foldynl foldynl added the enhancement New feature or request label Jun 9, 2024
@foldynl
Copy link
Owner

foldynl commented Jun 9, 2024

Issue also occurs in case of eQSL, HamQTH and LoTW. Unfortunately, eQSL and HamQTH seem to require GET. LoTW is down so I can't download the API spec to confirm whether POST is supported.

@foldynl foldynl moved this from Todo to In Progress in v0.37.0 Roadmap (Closed) Jun 9, 2024
@foldynl foldynl moved this from In Progress to Done - branch: testing_0.37 in v0.37.0 Roadmap (Closed) Jun 20, 2024
@foldynl foldynl closed this as completed by moving to Done - branch: testing_0.37 in v0.37.0 Roadmap (Closed) Jun 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Done - branch: testing_0.37
Development

No branches or pull requests

2 participants