diff options
author | B Stack <bgstack15@gmail.com> | 2020-07-22 11:37:03 -0400 |
---|---|---|
committer | B Stack <bgstack15@gmail.com> | 2020-07-22 11:37:03 -0400 |
commit | c95b3937fef3e2c63768f1b3b1dc2c898f23d91d (patch) | |
tree | 10260e25ae905564f7978b83fc4e316670f987c6 /zen/http.cpp | |
parent | Merge branch '10.25' into 'master' (diff) | |
download | FreeFileSync-c95b3937fef3e2c63768f1b3b1dc2c898f23d91d.tar.gz FreeFileSync-c95b3937fef3e2c63768f1b3b1dc2c898f23d91d.tar.bz2 FreeFileSync-c95b3937fef3e2c63768f1b3b1dc2c898f23d91d.zip |
add upstream 11.0
Diffstat (limited to 'zen/http.cpp')
-rw-r--r-- | zen/http.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/zen/http.cpp b/zen/http.cpp index 848b2cb3..57d61221 100644 --- a/zen/http.cpp +++ b/zen/http.cpp @@ -492,7 +492,7 @@ bool zen::isValidEmail(const std::string& email) if (comp.empty() || !std::all_of(comp.begin(), comp.end(), [](char c) { const char printable[] = "!#$%&'*+-/=?^_`{|}~"; - return isAsciiAlpha(c) || isDigit(c) || makeUnsigned(c) >= 128 || + return isAsciiAlpha(c) || isDigit(c) || !isAsciiChar(c) || std::find(std::begin(printable), std::end(printable), c) != std::end(printable); })) return false; @@ -507,7 +507,7 @@ bool zen::isValidEmail(const std::string& email) for (const std::string& comp : split(domain, '.', SplitType::ALLOW_EMPTY)) if (comp.empty() || comp.size() > 63 || - !std::all_of(comp.begin(), comp.end(), [](char c) { return isAsciiAlpha(c) ||isDigit(c) || makeUnsigned(c) >= 128 || c == '-'; })) + !std::all_of(comp.begin(), comp.end(), [](char c) { return isAsciiAlpha(c) ||isDigit(c) || !isAsciiChar(c) || c == '-'; })) return false; } |