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

greader.php: only return 'OK' on greader.php without query parameters #6238

Merged
merged 1 commit into from
Apr 1, 2024

Conversation

Frenzie
Copy link
Member

@Frenzie Frenzie commented Mar 26, 2024

It'd be clearer if the API endpoint didn't return OK when adding the Email and Passwd parameters. Whether it should instead return OK if they're correct is debatable.

In reply to #5856 (comment).

How to test the feature manually:

Before:

$ http 'http://localhost:8080/api/greader.php?Email=<user>&Passwd=<pass>'
HTTP/1.1 200 OK
Connection: Keep-Alive
Content-Length: 2
Content-Type: text/html; charset=UTF-8
Date: Tue, 26 Mar 2024 20:24:45 GMT
Keep-Alive: timeout=5, max=100
Server: Apache/2.4.54 (Unix)
X-Powered-By: PHP/8.0.26

OK

After:

$ http 'http://localhost:8080/api/greader.php?Email=<user>&Passwd=<pass>'
HTTP/1.1 400 Bad Request
Connection: close
Content-Length: 12
Content-Type: text/plain; charset=UTF-8
Date: Tue, 26 Mar 2024 20:25:14 GMT
Server: Apache/2.4.54 (Unix)
X-Powered-By: PHP/8.0.26

Bad Request!

Pull request checklist:

  • clear commit messages
  • code manually tested
  • unit tests written (optional if too hard)
  • documentation updated

It'd be clearer if the API endpoint didn't return `OK` when adding the `Email` and `Passwd` parameters. Whether it should indeed return `OK` if they're correct is debatable.

In reply to <#5856 (comment)>.
@Alkarex Alkarex added the API 🤝 API for other clients label Apr 1, 2024
@Alkarex Alkarex added this to the 1.24.0 milestone Apr 1, 2024
@Alkarex Alkarex merged commit d7f5ef3 into edge Apr 1, 2024
2 checks passed
@Alkarex Alkarex deleted the Frenzie-patch-1 branch April 1, 2024 09:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API 🤝 API for other clients
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants