Closed solracsf closed 1 week ago
@solracsf I suppose you can reproduce this behaviour. Do you know how/what redirects you to /apps/user_saml/saml/selectUserBackEnd
?
The redirect should only happen at https://github.com/nextcloud/user_saml/blob/master/appinfo/app.php#L123-L133 and at this point $redirectUrl
is at least an empty string.
Well, i don't really know what redirects to that URI, but to reproduce, just call:
https://cloud.example.com/apps/user_saml/saml/selectUserBackEnd
instead of
https://cloud.example.com/apps/user_saml/saml/selectUserBackEnd?redirectUrl=
Without the query param ?redirectUrl=
, error is trown.
Maybe pass a default value to:
like
public function selectUserBackEnd(string $redirectUrl = ''): Http\TemplateResponse {
?
The location should not be opened without the redirect URL. So if there was another source other than manually loading it without parameter, that be of interest. For manual the default value is the way, that's right, if there was another trigger, however, the fix should not be against the symptom.
So if there was another source other than manually loading it without parameter, that be of interest.
I can't tell. The only thing I've got were some (10+) log lines like these last week. ⛵
So if there was another source other than manually loading it without parameter, that be of interest.
I can't tell. The only thing I've got were some (10+) log lines like these last week. ⛵
Sounds weird. Especially in this amount. Can you tell whether these are real users, or perhaps something automated?
In the trace, user
is empty and the IP of the request seems indeed an automated one (IP comes from a datacenter).
After checking logs from that IP, this is the sequence, with associated HTTP codes:
GET / 302
GET /login 302
GET /apps/user_saml/saml/selectUserBackEnd 500
GET /apps/theming/favicon 200
But if I call /
i'm 302
redirected to /apps/user_saml/saml/selectUserBackEnd?redirectUrl=
...
# curl -IL cloud.example.com
HTTP/1.1 308 Permanent Redirect
location: https://cloud.example.com/
HTTP/2 302
location: https://cloud.example.com/login
HTTP/2 302
location: https://cloud.example.com/apps/user_saml/saml/selectUserBackEnd?redirectUrl=
HTTP/2 200
Empty user is expected. Authenticated users cannot reach this endpoint. Anyhow, for some reason they strip the query part of the redirect.
Did you double check whether the IP address was trying to access other URLs as well?
It does not really make sense to infinitely run against Nextcloud's root url, unless it's a pretty poor dos attempt?
No, no other access logs, only those 4 URLs, in that order.
🤷
How to use GitHub
Log file
Server configuration
Web server: Nginx
Database: MariaDB
PHP version: 8.2
Nextcloud version: 28.0.12