Update to latest louloulibs revision, and add test for hostname validity
fix #2694
This commit is contained in:
1 parent
763be827c9
commit
fbeb5af364
2 files changed
+7
-2
No files matched your search
+1
-1
Submodule louloulibs updated: eaa4fbba81...89398b5d88.
+6
-1
@@ -295,11 +295,16 @@ int main()
|
|||||||
assert(jidprep(badjid) == "~zigougoutm@epik-7d9d1fde.poez.io/Boujour/coucou/sltTM");
|
assert(jidprep(badjid) == "~zigougoutm@epik-7d9d1fde.poez.io/Boujour/coucou/sltTM");
|
||||||
assert(jidprep(badjid) == "~zigougoutm@epik-7d9d1fde.poez.io/Boujour/coucou/sltTM");
|
assert(jidprep(badjid) == "~zigougoutm@epik-7d9d1fde.poez.io/Boujour/coucou/sltTM");
|
||||||
|
|
||||||
const std::string& badjid2("Zigougou@poez.io");
|
const std::string badjid2("Zigougou@poez.io");
|
||||||
const std::string correctjid2 = jidprep(badjid2);
|
const std::string correctjid2 = jidprep(badjid2);
|
||||||
std::cout << correctjid2 << std::endl;
|
std::cout << correctjid2 << std::endl;
|
||||||
assert(correctjid2 == "zigougou@poez.io");
|
assert(correctjid2 == "zigougou@poez.io");
|
||||||
|
|
||||||
|
const std::string crappy("~Bisous@7ea8beb1:c5fd2849:da9a048e:ip");
|
||||||
|
const std::string fixed_crappy = jidprep(crappy);
|
||||||
|
std::cout << fixed_crappy << std::endl;
|
||||||
|
assert(fixed_crappy == "~bisous@7ea8beb1-c5fd2849-da9a048e-ip");
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* IID parsing
|
* IID parsing
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in new issue
Block a user