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

Patch certificate login error for FortiOS 7.4.4 #1234

Merged
merged 1 commit into from
Jul 22, 2024

Conversation

Voriaz
Copy link

@Voriaz Voriaz commented Jul 22, 2024

Hi,

After I encounter an issue on my Fortigate following FortiOS upgrade from 7.2.8 to 7.4.4 (see the issue I openned: here).
My investigation leads me to think that now Fortigate > 7.2.4 doesn't support any content when issuing login request on "/remote/login" and so "Content-length" must be 0. This is confirmed by the debug logs on the firewall saying do_http_validate:447 Content-Length (11) on uri (/remote/login) not allowed and by observing Forticlient requests content on Windows using Burp proxy that have no content.

So I'm proposing this pull request to fix the issue on newer Fortigate version where GET request on "/remote/login" is now sending nothing instead of "cert=&nup=1".

This has been tested on a Fortigate 500E running FortiOS 7.4.4.

BR,

A.

@DimitriPapadopoulos
Copy link
Collaborator

DimitriPapadopoulos commented Jul 22, 2024

The modified code had been introduced in #464 / 320f95f and #631 / abf1a95 to add smartcard support. It is triggered only if you do not pass a password:

openfortivpn -vv **********:8443 --user-cert=cert --user-key=key --trusted-cert ****************************

I don't know why cert=&nup=1 ("no user password"?) had initially been added. The pull request doesn't get into such details. My only concern is that older versions of FortiOS might require options nup=1 or cert=, while FortiOS 7.4 doesn't like then. But then, if current versions of FortiClient don't send these options, I guess this change is pretty safe.

@DimitriPapadopoulos DimitriPapadopoulos merged commit a6fe5cb into adrienverge:master Jul 22, 2024
5 checks passed
@DimitriPapadopoulos
Copy link
Collaborator

Thank you @Voriaz.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants