summaryrefslogtreecommitdiff
path: root/zen/http.cpp
diff options
context:
space:
mode:
authorB Stack <bgstack15@gmail.com>2020-07-22 16:56:03 +0000
committerB Stack <bgstack15@gmail.com>2020-07-22 16:56:03 +0000
commite5633fb1c0db91f01ab967330b76baf4ecdb0512 (patch)
tree10260e25ae905564f7978b83fc4e316670f987c6 /zen/http.cpp
parentMerge branch '10.25' into 'master' (diff)
parentadd upstream 11.0 (diff)
downloadFreeFileSync-e5633fb1c0db91f01ab967330b76baf4ecdb0512.tar.gz
FreeFileSync-e5633fb1c0db91f01ab967330b76baf4ecdb0512.tar.bz2
FreeFileSync-e5633fb1c0db91f01ab967330b76baf4ecdb0512.zip
Merge branch '11.0' into 'master'11.0
add upstream 11.0 See merge request opensource-tracking/FreeFileSync!24
Diffstat (limited to 'zen/http.cpp')
-rw-r--r--zen/http.cpp4
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;
}
bgstack15