Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    CSRF Check Failed on Login with no internet

    Scheduled Pinned Locked Moved webGUI
    23 Posts 10 Posters 16.1k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • D
      dma_pf
      last edited by

      This also happens to me almost every time I use the GUI. This has been happening for months.

      In my case I am always logged into pfsense from a laptop connected by ethernet cable to the LAN. The WAN has always been up at the time that it happens.

      Currently I'm using Firefox 79.0 64 bit, but this has happened on earlier versions as well. It seems to be more of a prominent issue if I have several tabs open in the browser with different pfsense GUI pages open. I am logging into the GUI by HTTPS (not HTTP) and I have imported the GUI certificate in pfsense into the certificate manager in Firefox.

      I'm not sure if this is a related issue or not, but I am also having issues with timeouts in the GUI which I posted about here: https://forum.netgate.com/topic/156131/gui-timeout

      I'm running pfsense version 2.4.4-RELEASE-p3 (amd64). Just ask me if there's anything I can do to help troubleshoot this issue further. I'm happy to help!

      1 Reply Last reply Reply Quote 0
      • B
        bigjohns97
        last edited by

        I updated to 2.5.x yesterday trying to fix this issue and it did not fix it so it has nothing to do with the internet being down or being able to resolve ews.netgate.com

        1 Reply Last reply Reply Quote 0
        • jimpJ
          jimp Rebel Alliance Developer Netgate
          last edited by

          As I mentioned before the only way I can reproduce this is to double click the "Sign In" button on the login page. So before anything else, make sure you are not double clicking / double tapping that button.

          Remember: Upvote with the ๐Ÿ‘ button for any user/post you find to be helpful, informative, or deserving of recognition!

          Need help fast? Netgate Global Support!

          Do not Chat/PM for help!

          B 1 Reply Last reply Reply Quote 0
          • B
            bigjohns97 @jimp
            last edited by

            @jimp When I just click once it just sits and spins and never shows the GUI, checking logs it does show successful login (twice when i click it the second time)

            JeGrJ 1 Reply Last reply Reply Quote 0
            • jimpJ
              jimp Rebel Alliance Developer Netgate
              last edited by

              I haven't seen that happen before but next time it does, try refreshing the page but not resubmitting the form. (Or navigate away from the firewall and back).

              Also are you using local auth or a server like LDAP or RADIUS for GUI authentication?

              Remember: Upvote with the ๐Ÿ‘ button for any user/post you find to be helpful, informative, or deserving of recognition!

              Need help fast? Netgate Global Support!

              Do not Chat/PM for help!

              B 1 Reply Last reply Reply Quote 0
              • B
                bigjohns97 @jimp
                last edited by

                @jimp Local auth, if I hit f5 the form is cleared and the loading of the page stops.

                1 Reply Last reply Reply Quote 0
                • B
                  bigjohns97
                  last edited by bigjohns97

                  BTW I forgot to mention this only happens with Chrome, and it does happen after clearing cache and in ingcognito.

                  1 Reply Last reply Reply Quote 0
                  • JeGrJ
                    JeGr LAYER 8 Moderator @bigjohns97
                    last edited by JeGr

                    @bigjohns97 said in CSRF Check Failed on Login with no internet:

                    @jimp When I just click once it just sits and spins and never shows the GUI, checking logs it does show successful login (twice when i click it the second time)

                    I had that phenomenom with an older chrome version. Never had that effect with edgium, chromium or other browsers though but I'm guessing it was somewhat related to blocking referrer, cookies or scripts. After login it just "loaded endlessly" and if you clicked the URL bar and hit enter you were immediatly logged in on the dashboard (that's why I was guessing it had something to do with the browser not getting the redirection/rewrite properly after logging in). But that's completely browser related and no failure of CSRF or the pfSense login page IMHO.

                    Another interesting fact: another chrome profile with no extensions and "blank" didn't have that problems, it was only the one profile I used for work, with my private one I had no redirection/login issue. Perhaps that's something @bigjohns97 can test: create a new fresh clean chrome profile, switch to it, don't have any extensions etc. loaded and just try default chrome settings and try logging in. Perhaps it's something with your profile like mine.

                    Don't forget to upvote ๐Ÿ‘ those who kindly offered their time and brainpower to help you!

                    If you're interested, I'm available to discuss details of German-speaking paid support (for companies) if needed.

                    B 2 Replies Last reply Reply Quote 0
                    • B
                      bigjohns97 @JeGr
                      last edited by

                      @JeGr This is very interesting, clicking the address bar and then hitting f5 does login immediately, just hitting f5 doesn't do anything but clear the forum.

                      Doing incognito produces the same result which is what a new profile would produce as well, I do have it set to not load add-in's on incognito.

                      1 Reply Last reply Reply Quote 0
                      • B
                        bigjohns97 @JeGr
                        last edited by

                        @JeGr I did end up trying the guest profile and it did work, so I don't think it's an extension but must be something with the profile in chrome, I am going to check my settings and see if I can find something different that might account for this.

                        1 Reply Last reply Reply Quote 0
                        • D
                          dma_pf
                          last edited by

                          I should note that in my case I am getting the error after I have successfully logged into the GUI. I'll be working on something within the GUI. I might then go to save a setting, check an option, navigate to a new page, etc, and then I get redirected to the CSRF error page. I then have to go back to the login page and login again and start whatever I was doing all over again.

                          1 Reply Last reply Reply Quote 0
                          • GertjanG
                            Gertjan
                            last edited by

                            For what it's worth : CSRF is cookie (== session) based.
                            If a browser, or browser plugin/extension does nasty things with the cookie, CSRF kicks in.

                            No "help me" PM's please. Use the forum, the community will thank you.
                            Edit : and where are the logs ??

                            1 Reply Last reply Reply Quote 0
                            • First post
                              Last post
                            Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.