[cpp-sp] branch master updated: Slight code improvement to handler check.

Scott Cantor cantor.2 at osu.edu
Tue May 29 11:27:31 EDT 2018


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

scantor pushed a commit to branch master
in repository cpp-sp.

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

The following commit(s) were added to refs/heads/master by this push:
       new  0400070   Slight code improvement to handler check.
0400070 is described below

commit 0400070b0a4a5a71167565f0723ced166604a730
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Tue May 29 11:27:25 2018 -0400

    Slight code improvement to handler check.
---
 iis7_shib/ShibHttpModule.cpp | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/iis7_shib/ShibHttpModule.cpp b/iis7_shib/ShibHttpModule.cpp
index 45bdb97..fdc341c 100644
--- a/iis7_shib/ShibHttpModule.cpp
+++ b/iis7_shib/ShibHttpModule.cpp
@@ -41,11 +41,7 @@ ShibHttpModule::DoHandler(
 {
     // Quickly check the URL
     const wstring url(pHttpContext->GetScriptName());
-    if (url.length() < g_handlerPrefix.length())
-        return RQ_NOTIFICATION_CONTINUE;
-
-    const wstring cmp(url.substr(0, g_handlerPrefix.length()));
-    if (cmp != g_handlerPrefix)
+    if (url.length() < g_handlerPrefix.length() || !starts_with(url, g_handlerPrefix))
         return RQ_NOTIFICATION_CONTINUE;
 
     map<string,site_t>::const_iterator map_i = g_Sites.find(lexical_cast<string>(pHttpContext->GetSite()->GetSiteId()));

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


More information about the commits mailing list