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

    PfSense 2.2.1 - Captive portal bug?

    Scheduled Pinned Locked Moved Captive Portal
    18 Posts 5 Posters 7.7k 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.
    • DerelictD
      Derelict LAYER 8 Netgate
      last edited by

      https://redmine.pfsense.org/issues/3124

      Chattanooga, Tennessee, USA
      A comprehensive network diagram is worth 10,000 words and 15 conference calls.
      DO NOT set a source address/port in a port forward or firewall rule unless you KNOW you need it!
      Do Not Chat For Help! NO_WAN_EGRESS(TM)

      1 Reply Last reply Reply Quote 0
      • X
        XanderVR
        last edited by

        @Derelict:

        https://redmine.pfsense.org/issues/3124

        I can confirm this was the solution to the double forms.
        However, the other issues still stand: the wrong error message: Invalid credentials specified.

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

          With the patch proposed above, this:
          @XanderVR:

          However, the other issues still stand: the wrong error message: Invalid credentials specified.

          (which is the second instance of error-login-page)
          shouldn't show up any more ….

          I deducted this from reading the code.

          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
          • X
            XanderVR
            last edited by

            @Gertjan:

            With the patch proposed above, this:
            @XanderVR:

            However, the other issues still stand: the wrong error message: Invalid credentials specified.

            (which is the second instance of error-login-page)
            shouldn't show up any more ….

            I deducted this from reading the code.

            Unfortunately this is not the case.
            I changed the lines as was specified in the bug report.
            This solved the case of the second form showing up.

            When I now enter a voucher code that has been used by someone esle, AND is currently active, I get the message that the voucher is already activated by someone else.
            When I enter an invalid voucher code, I get the error message: "Invalid credentials specified" and not "Invalid voucher"
            When I enter a voucher code that has already expired, I get the error message: "Invalid credentials specified", and not "Voucher expired"

            So where does it go wrong?
            This is just a plain install of pfSense 2.2.1
            No plugins/addons/etc, the only change is the one mentioned in the bugreport.

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

              @XanderVR:

              So where does it go wrong?

              Guess what ?

              Its a bug ….
              I'll put a patch up.

              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
              • DerelictD
                Derelict LAYER 8 Netgate
                last edited by

                So what?

                Captive portal needs a complete rewrite.  Looks like it'll be in python.

                Until then, it's working generally correctly.  I'm sure patches making the messages saner would be graciously accepted.

                Chattanooga, Tennessee, USA
                A comprehensive network diagram is worth 10,000 words and 15 conference calls.
                DO NOT set a source address/port in a port forward or firewall rule unless you KNOW you need it!
                Do Not Chat For Help! NO_WAN_EGRESS(TM)

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

                  It's a simple one.

                  Use the "System Patches" package to to apply it (or do it by hand):
                  https://github.com/Gertjanpfsense/pfsense/commit/4828d672b1fbb06e45c272b329aafcfa9b9a8e20.patch

                  https://github.com/Gertjanpfsense/pfsense/commit/4828d672b1fbb06e45c272b329aafcfa9b9a8e20

                  The trouble was: $config['voucher'][$cpzone]['msgexpired'] (and $config['voucher'][$cpzone]['msgnoaccess']) do not exist - the default error message $errormsg ( = "Invalid credentials specified."; ) is always shown.

                  I applied the parch on my own copy of pfSense. Looking good so far.
                  Expired vouchers are signaled as should be.
                  The more general error 'msgnoaccess' also.

                  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
                  • X
                    XanderVR
                    last edited by

                    That made sense :)

                    Just changed the code and indeed it works now :)
                    Thank you very much

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

                      I did some research about side-effect. Found none.

                      Pull request against 'master' posted : https://github.com/pfsense/pfsense/pull/1587

                      (twisting my fingers for that my SLA agreement is still valid, etc)

                      edit: Pull accepted. Thanks XanderVR for bringing this up  :)

                      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
                      • B
                        bmginn
                        last edited by

                        @Gertjan:

                        I did some research about side-effect. Found none.

                        Pull request against 'master' posted : https://github.com/pfsense/pfsense/pull/1587

                        (twisting my fingers for that my SLA agreement is still valid, etc)

                        edit: Pull accepted. Thanks XanderVR for bringing this up  :)

                        It seems these prefixes are present in 2.3.2, but I'm still experiencing the same issue as OP; the double login boxes with double errors. Any ideas?

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

                          @bmginn and  @th112211 compare your pfSense version with the one mentioned in subject of this thread.

                          I advise you to open a new thread and detail what you found out.

                          Btw : I'm not using vouchers.

                          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.