string compare

huiming via mod-security-users <[email protected]> Fri, 2 Jul 2021 18:02:37 +0800
Newsgroups gmane.comp.apache.mod-security.user
Message-ID <[email protected]>
hi all,&nbsp;


Who can help me understand why the highlighted is not&nbsp;&nbsp;toupper(aa) == toupper(bb)&nbsp; or tolower(aa)==tolower(bb)&nbsp; ?


in file ModSecurity/src/variables/variable.h


class VariableMonkeyResolution {
&nbsp;public:
&nbsp; &nbsp; VariableMonkeyResolution () { }&nbsp;
&nbsp; &nbsp; static inline bool comp(const std::string &amp;a, const std::string &amp;b) {
&nbsp; &nbsp; &nbsp; &nbsp; return a.size() == b.size()
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&amp;&amp; std::equal(a.begin(), a.end(), b.begin(),
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [](char aa, char bb) {
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return toupper(aa) == bb;&nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; });&nbsp;
&nbsp; &nbsp; }&nbsp; &nbsp;



thanks
huiming

_______________________________________________
mod-security-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mod-security-users
Commercial ModSecurity Rules and Support from Trustwave's SpiderLabs:
http://www.modsecurity.org/projects/commercial/rules/
http://www.modsecurity.org/projects/commercial/support/