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

    Firewall Rules "Please Match Requested Format" in IP fields in Chrome

    General pfSense Questions
    12
    19
    6.2k
    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.
    • T
      Tubal
      last edited by

      Hi all.  In all of our installations, since we updated to 2.3.2, I've been getting this error in the 'source' and 'destination' fields when attempting to add/edit firewall rules in Google Chrome.

      This only happens in Google Chrome, and if I enter the same thing in Internet Explorer, it goes through fine.  I'd much rather use Chrome to modify our firewalls, since that's what I use for everything else.

      As far as I can tell, the IPv4 address format hasn't changed in many years, so I'm wondering if this is only a problem for me or what is going on?

      In chrome dev tools, I'm getting this error:

      firewall_rules_edit.php?if=wan&after=-1:1 Pattern attribute value [a-zA-Z0-9_.:]+ is not a valid regular expression: Uncaught SyntaxError: Invalid regular expression: /[a-zA-Z0-9_.:]+/: Invalid escape

      1.png
      1.png_thumb
      2.png_thumb
      2.png

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

        Is that a release version of Chrome or a beta?

        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!

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

          I thought it was just me! I was sure I knew the IPV4 format!
          I'm on the Chome Beta channel - currently Version 53.0.2785.70 beta-m (64-bit).
          Pfsense Version 2.3.2-RELEASE (amd64)
          built on Tue Jul 19 12:44:43 CDT 2016
          FreeBSD 10.3-RELEASE-p5

          1 Reply Last reply Reply Quote 0
          • J
            JorgeOliveira
            last edited by

            This PR covers all instances of the error and will fix the regex format:
            https://github.com/pfsense/pfsense/pull/3123

            My views have absolutely no warranty express or implied. Always do your own research.

            1 Reply Last reply Reply Quote 0
            • luckman212L
              luckman212 LAYER 8
              last edited by

              Chrome 53.0.2785.89 (release) dropped yesterday.  Is this still a problem?  I couldn't reproduce it on 2.3.2…

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

                Yes, the same bug made it into Chrome 53, so more people are likely to hit it as that rolls out.

                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!

                1 Reply Last reply Reply Quote 0
                • luckman212L
                  luckman212 LAYER 8
                  last edited by

                  What are the exact steps to repro it? I couldn't make it happen on my box with Chrome 53 (Mac)

                  1 Reply Last reply Reply Quote 0
                  • N
                    nandattebayu
                    last edited by

                    hi. i still have the same problem  in google chrome browser but when i try firefox/IE  it works fine.  ;D

                    1 Reply Last reply Reply Quote 0
                    • C
                      capone
                      last edited by

                      I can confirm, I am getting the same error in Chrome. I am running version: Version 53.0.2785.101 m (64-bit) and its currently "Up to date".

                      I am not getting the "Please match Requested Format" in Firefox version: 45.3.0.

                      I copied a rule, and was modifying it… when I changed the destination to "Network" and I put in the IP format... after hitting save.. I got the error...

                      So, I launched FF, and copy and pasted from Chrome and FF...then save the rule...and it went through fine.

                      1 Reply Last reply Reply Quote 0
                      • A
                        Admonstrator
                        last edited by

                        Hi there,

                        same problem here but I found a way to fix this within Chrome: If the error appears just click on the element → Inspect element
                        You will find something like this:

                        Just remove the plus sign (+) within the "pattern" value and everything is working fine.

                        Best regards,
                        Admon

                        Edit: I'm using Chrome 53.0.2785.113 m (64-bit)

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

                          Do not do that. It may bypass the warning but it is also not correct. Use the System Patches package to apply https://patch-diff.githubusercontent.com/raw/pfsense/pfsense/pull/3127.patch, or at least make the change that is done in the patch.

                          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!

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

                            @jimp:

                            Do not do that. It may bypass the warning but it is also not correct. Use the System Patches package to apply https://patch-diff.githubusercontent.com/raw/pfsense/pfsense/pull/3127.patch, or at least make the change that is done in the patch.

                            Installed that package, pulled the patch file from the link given, this is the result for me…

                            Patch can NOT be applied cleanly (detail)
                            Patch can NOT be reverted cleanly (detail)

                            Patch Test Output apply
                            /usr/bin/patch --directory=/ -t -p1 -i /var/patches/57e02d540bb47.patch --check --forward --ignore-whitespace
                            
                            Hmm...  Looks like a unified diff to me...
                            The text leading up to this was:
                            --------------------------
                            |From 8ea3fd0569ac2b1681de5ba3fbc2a2cc20981ad6 Mon Sep 17 00:00:00 2001
                            |From: PiBa-NL 
                            |Date: Fri, 2 Sep 2016 00:59:52 +0200
                            |Subject: [PATCH] Input boxes with setPattern validation should not contain
                            | escape characters as they are already properly considered 'lists of
                            | characters' even when not escaped.
                            |
                            |---
                            | src/usr/local/www/firewall_nat_1to1_edit.php               | 4 ++--
                            | src/usr/local/www/firewall_nat_out_edit.php                | 4 ++--
                            | src/usr/local/www/firewall_rules_edit.php                  | 2 +-
                            | src/usr/local/www/services_igmpproxy_edit.php              | 2 +-
                            | src/usr/local/www/services_router_advertisements.php       | 2 +-
                            | src/usr/local/www/services_unbound_domainoverride_edit.php | 2 +-
                            | 6 files changed, 8 insertions(+), 8 deletions(-)
                            |
                            |diff --git a/src/usr/local/www/firewall_nat_1to1_edit.php b/src/usr/local/www/firewall_nat_1to1_edit.php
                            |index 7efb07e..7fd19f4 100644
                            |--- a/src/usr/local/www/firewall_nat_1to1_edit.php
                            |+++ b/src/usr/local/www/firewall_nat_1to1_edit.php
                            --------------------------
                            No file to patch.  Skipping...
                            Hunk #1 ignored at 439.
                            Hunk #2 ignored at 466.
                            2 out of 2 hunks ignored while patching src/usr/local/www/firewall_nat_1to1_edit.php
                            Hmm...  The next patch looks like a unified diff to me...
                            The text leading up to this was:
                            --------------------------
                            |diff --git a/src/usr/local/www/firewall_nat_out_edit.php b/src/usr/local/www/firewall_nat_out_edit.php
                            |index 0b4bbae..6c845e5 100644
                            |--- a/src/usr/local/www/firewall_nat_out_edit.php
                            |+++ b/src/usr/local/www/firewall_nat_out_edit.php
                            --------------------------
                            No file to patch.  Skipping...
                            Hunk #1 ignored at 484.
                            Hunk #2 ignored at 508.
                            2 out of 2 hunks ignored while patching src/usr/local/www/firewall_nat_out_edit.php
                            Hmm...  The next patch looks like a unified diff to me...
                            The text leading up to this was:
                            --------------------------
                            |diff --git a/src/usr/local/www/firewall_rules_edit.php b/src/usr/local/www/firewall_rules_edit.php
                            |index 84562df9..43f2e5d 100644
                            |--- a/src/usr/local/www/firewall_rules_edit.php
                            |+++ b/src/usr/local/www/firewall_rules_edit.php
                            --------------------------
                            No file to patch.  Skipping...
                            Hunk #1 ignored at 1323.
                            1 out of 1 hunks ignored while patching src/usr/local/www/firewall_rules_edit.php
                            Hmm...  The next patch looks like a unified diff to me...
                            The text leading up to this was:
                            --------------------------
                            |diff --git a/src/usr/local/www/services_igmpproxy_edit.php b/src/usr/local/www/services_igmpproxy_edit.php
                            |index c862424..bc76256 100644
                            |--- a/src/usr/local/www/services_igmpproxy_edit.php
                            |+++ b/src/usr/local/www/services_igmpproxy_edit.php
                            --------------------------
                            No file to patch.  Skipping...
                            Hunk #1 ignored at 224.
                            1 out of 1 hunks ignored while patching src/usr/local/www/services_igmpproxy_edit.php
                            Hmm...  The next patch looks like a unified diff to me...
                            The text leading up to this was:
                            --------------------------
                            |diff --git a/src/usr/local/www/services_router_advertisements.php b/src/usr/local/www/services_router_advertisements.php
                            |index e2df3e4..bd47b13 100644
                            |--- a/src/usr/local/www/services_router_advertisements.php
                            |+++ b/src/usr/local/www/services_router_advertisements.php
                            --------------------------
                            No file to patch.  Skipping...
                            Hunk #1 ignored at 436.
                            1 out of 1 hunks ignored while patching src/usr/local/www/services_router_advertisements.php
                            Hmm...  The next patch looks like a unified diff to me...
                            The text leading up to this was:
                            --------------------------
                            |diff --git a/src/usr/local/www/services_unbound_domainoverride_edit.php b/src/usr/local/www/services_unbound_domainoverride_edit.php
                            |index 55274d4..ed3c631 100644
                            |--- a/src/usr/local/www/services_unbound_domainoverride_edit.php
                            |+++ b/src/usr/local/www/services_unbound_domainoverride_edit.php
                            --------------------------
                            No file to patch.  Skipping...
                            Hunk #1 ignored at 133.
                            1 out of 1 hunks ignored while patching src/usr/local/www/services_unbound_domainoverride_edit.php
                            done
                            
                            Patch Test Output revert
                            /usr/bin/patch --directory=/ -f -p1 -i /var/patches/57e02d540bb47.patch --check --reverse --ignore-whitespace
                            
                            Hmm...  Looks like a unified diff to me...
                            The text leading up to this was:
                            --------------------------
                            |From 8ea3fd0569ac2b1681de5ba3fbc2a2cc20981ad6 Mon Sep 17 00:00:00 2001
                            |From: PiBa-NL 
                            |Date: Fri, 2 Sep 2016 00:59:52 +0200
                            |Subject: [PATCH] Input boxes with setPattern validation should not contain
                            | escape characters as they are already properly considered 'lists of
                            | characters' even when not escaped.
                            |
                            |---
                            | src/usr/local/www/firewall_nat_1to1_edit.php               | 4 ++--
                            | src/usr/local/www/firewall_nat_out_edit.php                | 4 ++--
                            | src/usr/local/www/firewall_rules_edit.php                  | 2 +-
                            | src/usr/local/www/services_igmpproxy_edit.php              | 2 +-
                            | src/usr/local/www/services_router_advertisements.php       | 2 +-
                            | src/usr/local/www/services_unbound_domainoverride_edit.php | 2 +-
                            | 6 files changed, 8 insertions(+), 8 deletions(-)
                            |
                            |diff --git a/src/usr/local/www/firewall_nat_1to1_edit.php b/src/usr/local/www/firewall_nat_1to1_edit.php
                            |index 7efb07e..7fd19f4 100644
                            |--- a/src/usr/local/www/firewall_nat_1to1_edit.php
                            |+++ b/src/usr/local/www/firewall_nat_1to1_edit.php
                            --------------------------
                            No file to patch.  Skipping...
                            Hunk #1 ignored at 439.
                            Hunk #2 ignored at 466.
                            2 out of 2 hunks ignored while patching src/usr/local/www/firewall_nat_1to1_edit.php
                            Hmm...  The next patch looks like a unified diff to me...
                            The text leading up to this was:
                            --------------------------
                            |diff --git a/src/usr/local/www/firewall_nat_out_edit.php b/src/usr/local/www/firewall_nat_out_edit.php
                            |index 0b4bbae..6c845e5 100644
                            |--- a/src/usr/local/www/firewall_nat_out_edit.php
                            |+++ b/src/usr/local/www/firewall_nat_out_edit.php
                            --------------------------
                            No file to patch.  Skipping...
                            Hunk #1 ignored at 484.
                            Hunk #2 ignored at 508.
                            2 out of 2 hunks ignored while patching src/usr/local/www/firewall_nat_out_edit.php
                            Hmm...  The next patch looks like a unified diff to me...
                            The text leading up to this was:
                            --------------------------
                            |diff --git a/src/usr/local/www/firewall_rules_edit.php b/src/usr/local/www/firewall_rules_edit.php
                            |index 84562df9..43f2e5d 100644
                            |--- a/src/usr/local/www/firewall_rules_edit.php
                            |+++ b/src/usr/local/www/firewall_rules_edit.php
                            --------------------------
                            No file to patch.  Skipping...
                            Hunk #1 ignored at 1323.
                            1 out of 1 hunks ignored while patching src/usr/local/www/firewall_rules_edit.php
                            Hmm...  The next patch looks like a unified diff to me...
                            The text leading up to this was:
                            --------------------------
                            |diff --git a/src/usr/local/www/services_igmpproxy_edit.php b/src/usr/local/www/services_igmpproxy_edit.php
                            |index c862424..bc76256 100644
                            |--- a/src/usr/local/www/services_igmpproxy_edit.php
                            |+++ b/src/usr/local/www/services_igmpproxy_edit.php
                            --------------------------
                            No file to patch.  Skipping...
                            Hunk #1 ignored at 224.
                            1 out of 1 hunks ignored while patching src/usr/local/www/services_igmpproxy_edit.php
                            Hmm...  The next patch looks like a unified diff to me...
                            The text leading up to this was:
                            --------------------------
                            |diff --git a/src/usr/local/www/services_router_advertisements.php b/src/usr/local/www/services_router_advertisements.php
                            |index e2df3e4..bd47b13 100644
                            |--- a/src/usr/local/www/services_router_advertisements.php
                            |+++ b/src/usr/local/www/services_router_advertisements.php
                            --------------------------
                            No file to patch.  Skipping...
                            Hunk #1 ignored at 436.
                            1 out of 1 hunks ignored while patching src/usr/local/www/services_router_advertisements.php
                            Hmm...  The next patch looks like a unified diff to me...
                            The text leading up to this was:
                            --------------------------
                            |diff --git a/src/usr/local/www/services_unbound_domainoverride_edit.php b/src/usr/local/www/services_unbound_domainoverride_edit.php
                            |index 55274d4..ed3c631 100644
                            |--- a/src/usr/local/www/services_unbound_domainoverride_edit.php
                            |+++ b/src/usr/local/www/services_unbound_domainoverride_edit.php
                            --------------------------
                            No file to patch.  Skipping...
                            Hunk #1 ignored at 133.
                            1 out of 1 hunks ignored while patching src/usr/local/www/services_unbound_domainoverride_edit.php
                            done
                            
                            1 Reply Last reply Reply Quote 0
                            • jimpJ
                              jimp Rebel Alliance Developer Netgate
                              last edited by

                              Set path strip to 2.

                              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!

                              1 Reply Last reply Reply Quote 0
                              • L
                                lobotiger
                                last edited by

                                Is this something that's going to be fixed in a future update to the main code?

                                LoboTiger

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

                                  The fix is already in the repository, it will be included in the next release (whichever version that may be).

                                  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!

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

                                    @jimp:

                                    Set path strip to 2.

                                    Thanks, worked nicely on apply, but the removal-test of the patch does throw a warning; Patch can NOT be reverted cleanly (detail). :)

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

                                      It can't be reverted cleanly because it isn't applied yet.

                                      Once it's applied then you can expect it to show that it will revert cleanly.

                                      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!

                                      1 Reply Last reply Reply Quote 0
                                      • S
                                        seed
                                        last edited by

                                        I can't add a port to a network, it doesn't persist:

                                        ![Screen Shot 2016-09-22 at 12.17.26 AM.png_thumb](/public/imported_attachments/1/Screen Shot 2016-09-22 at 12.17.26 AM.png_thumb)
                                        ![Screen Shot 2016-09-22 at 12.17.26 AM.png](/public/imported_attachments/1/Screen Shot 2016-09-22 at 12.17.26 AM.png)
                                        ![Screen Shot 2016-09-22 at 12.17.14 AM.png_thumb](/public/imported_attachments/1/Screen Shot 2016-09-22 at 12.17.14 AM.png_thumb)
                                        ![Screen Shot 2016-09-22 at 12.17.14 AM.png](/public/imported_attachments/1/Screen Shot 2016-09-22 at 12.17.14 AM.png)

                                        1 Reply Last reply Reply Quote 0
                                        • DerelictD
                                          Derelict LAYER 8 Netgate
                                          last edited by

                                          Put it in the from port field, not the to field. By design.

                                          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
                                          • First post
                                            Last post
                                          Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.