-
Notifications
You must be signed in to change notification settings - Fork 327
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
String "SV1" in User-Agent causes HTTP status 405 #409
Comments
The history of the string I think just dropping that string and introducing a config option if that doesn't work for some people would be the right approach. |
For what it's worth the official FortiClient seems to be sending |
Unfortunately I have no idea what kind of device is in use since I am just a user. |
I intercepted the authentication flow of the Windows client available at https://forticlient.com via mitmproxy and got the The interesting thing is that that client will receive an 405 as well. But afterwards the client will continue with a few more requests. The whole flow looks like this:
The only point where the credentials are transmitted (probably since the body seems to be obfuscated with some salt from the first request) is the |
I now got valid credentials and it looks like this is actually intended behaviour! With the correct credentials I can connect properly; with the wrong credentials and the string FWIW, according to |
@mss thanks for reporting and analyzing this. |
In #408 I announced that I'd open a new pull request to fix this issue but I even though the solution looks simple I'm not sure about the correct approach.
TL;DR: This is a special case of #366: There are versions of FortiGate (I guess) which respond with a 405 status code if the
User-Agent
header contains the stringSV1
. I'd just drop this string but maybe there are other versions which expect it?The request looks like this:
and will receive a response like this:
I played around with the
User-Agent
header and something likeMozilla/5.0 (SV1)
and alsoMozilla/5.0 (SV2)
will still receive a 405 but no body (wtf?) while something likeMozilla/5.0 (Linux) Gecko/20100101
,Mozilla/5.0 SV9
or even justMozilla/5.0
will get a proper status 200.The text was updated successfully, but these errors were encountered: