[cpp-sp] 01/02: Fix case/regex inversion mistake.

Scott Cantor cantor.2 at osu.edu
Fri Dec 13 18:39:32 UTC 2024


This is an automated email from the git hooks/post-receive script.

scantor pushed a commit to branch dev/scott-wip
in repository cpp-sp.

View the commit online:
http://git.shibboleth.net/view/?p=cpp-sp.git;a=commit;h=42ba8f1fe0484e998d092d96f5778f4dbe9c6a72

commit 42ba8f1fe0484e998d092d96f5778f4dbe9c6a72
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Fri Dec 13 12:23:04 2024 -0500

    Fix case/regex inversion mistake.
---
 shibsp/impl/XMLAccessControl.cpp | 2 +-
 shibsp/impl/XMLRequestMapper.cpp | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/shibsp/impl/XMLAccessControl.cpp b/shibsp/impl/XMLAccessControl.cpp
index 8a08c2ef..ae239274 100644
--- a/shibsp/impl/XMLAccessControl.cpp
+++ b/shibsp/impl/XMLAccessControl.cpp
@@ -238,7 +238,7 @@ RuleRegex::RuleRegex(const ptree& pt)
     try {
         // TODO: more flag options, particular for dialect.
         regex::flag_type flags = regex_constants::optimize;
-        if (caseSensitive) {
+        if (!caseSensitive) {
             flags |= regex_constants::icase;
         }
         m_re = regex(m_exp, flags);
diff --git a/shibsp/impl/XMLRequestMapper.cpp b/shibsp/impl/XMLRequestMapper.cpp
index 74e3a1a3..1908c703 100644
--- a/shibsp/impl/XMLRequestMapper.cpp
+++ b/shibsp/impl/XMLRequestMapper.cpp
@@ -315,7 +315,7 @@ Override::Override(bool unicodeAware, ptree& pt, Category& log, const Override*
             try {
                 // TODO: more flag options, particular for dialect.
                 regex::flag_type flags = regex_constants::optimize;
-                if (getBool("caseSensitive", false)) {
+                if (!getBool("caseSensitive", false)) {
                     flags |= regex_constants::icase;
                 }
                 regex exp(regexpprop, flags);
@@ -345,7 +345,7 @@ Override::Override(bool unicodeAware, ptree& pt, Category& log, const Override*
                 try {
                     // TODO: more flag options, particular for dialect.
                     regex::flag_type flags = regex_constants::optimize;
-                    if (getBool("caseSensitive", false)) {
+                    if (!getBool("caseSensitive", false)) {
                         flags |= regex_constants::icase;
                     }
                     regex exp(regexpprop, flags);
@@ -506,7 +506,7 @@ XMLRequestMapperImpl::XMLRequestMapperImpl(ptree& pt, Category& log)
 
             try {
                 regex::flag_type flags = regex_constants::optimize;
-                if (getBool("caseSensitive", false)) {
+                if (!getBool("caseSensitive", false)) {
                     flags |= regex_constants::icase;
                 }
                 regex exp(regexprop, flags);

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the commits mailing list