Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package libvmime for openSUSE:Factory checked in at 2024-05-02 23:47:18 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/libvmime (Old) and /work/SRC/openSUSE:Factory/.libvmime.new.1880 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libvmime" Thu May 2 23:47:18 2024 rev:32 rq:1171168 version:0.9.2+g191 Changes: -------- --- /work/SRC/openSUSE:Factory/libvmime/libvmime.changes 2024-02-26 19:46:09.287565781 +0100 +++ /work/SRC/openSUSE:Factory/.libvmime.new.1880/libvmime.changes 2024-05-03 10:33:17.576704047 +0200 @@ -1,0 +2,8 @@ +Wed Apr 24 17:39:08 UTC 2024 - Jan Engelhardt <[email protected]> + +- Update to snapshot 0.9.2+git191 (d03ad5f0) + * url: fix an off-by-one error in parsing hostnames + * url: strip leading slash from url-path + * Support FIPS under OpenSSL 3 + +------------------------------------------------------------------- Old: ---- vmime-0.9.2+g188.tar.xz New: ---- vmime-0.9.2+g191.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libvmime.spec ++++++ --- /var/tmp/diff_new_pack.di0psB/_old 2024-05-03 10:33:18.236728053 +0200 +++ /var/tmp/diff_new_pack.di0psB/_new 2024-05-03 10:33:18.236728053 +0200 @@ -18,7 +18,7 @@ Name: libvmime %define lname libvmime-suse6 -Version: 0.9.2+g188 +Version: 0.9.2+g191 Release: 0 Summary: Library for working with RFC 5322, MIME messages and IMAP/POP/SMTP License: GPL-3.0-or-later ++++++ _service ++++++ --- /var/tmp/diff_new_pack.di0psB/_old 2024-05-03 10:33:18.272729362 +0200 +++ /var/tmp/diff_new_pack.di0psB/_new 2024-05-03 10:33:18.276729507 +0200 @@ -2,7 +2,7 @@ <service name="tar_scm" mode="manual"> <param name="scm">git</param> <param name="url">https://github.com/kisli/vmime</param> - <param name="revision">c3c6242ed135f9eca805380394791d17b0fc7a63</param> + <param name="revision">d03ad5f0f6d3b2d54009ccdc7d1f7670218b263c</param> <param name="parent-tag">v0.9.2</param> <param name="versionformat">0.9.2+g@TAG_OFFSET@</param> </service> ++++++ debian.changelog ++++++ --- /var/tmp/diff_new_pack.di0psB/_old 2024-05-03 10:33:18.304730526 +0200 +++ /var/tmp/diff_new_pack.di0psB/_new 2024-05-03 10:33:18.308730671 +0200 @@ -1,4 +1,4 @@ -libvmime (0.9.2+g188-0) unstable; urgency=low +libvmime (0.9.2+g191-0) unstable; urgency=low * Initial package. ++++++ libvmime.dsc ++++++ --- /var/tmp/diff_new_pack.di0psB/_old 2024-05-03 10:33:18.424734890 +0200 +++ /var/tmp/diff_new_pack.di0psB/_new 2024-05-03 10:33:18.428735036 +0200 @@ -1,7 +1,7 @@ Format: 1.0 Source: libvmime Architecture: any -Version: 0.9.2+g188 +Version: 0.9.2+g191 DEBTRANSFORM-RELEASE: 1 Maintainer: openSUSE <[email protected]> Homepage: https://opensuse.org/ ++++++ vmime-0.9.2+g188.tar.xz -> vmime-0.9.2+g191.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vmime-0.9.2+g188/src/vmime/net/tls/openssl/OpenSSLInitializer.cpp new/vmime-0.9.2+g191/src/vmime/net/tls/openssl/OpenSSLInitializer.cpp --- old/vmime-0.9.2+g188/src/vmime/net/tls/openssl/OpenSSLInitializer.cpp 2024-01-30 12:41:49.000000000 +0100 +++ new/vmime-0.9.2+g191/src/vmime/net/tls/openssl/OpenSSLInitializer.cpp 2024-03-04 11:48:48.000000000 +0100 @@ -115,10 +115,18 @@ OPENSSL_config(NULL); #endif +#if OPENSSL_VERSION_NUMBER >= 0x30000000L + static const bool isFIPSenabled = EVP_default_properties_is_fips_enabled(nullptr) == 1; +#else + static const bool isFIPSenabled = FIPS_mode() == 1; +#endif + #if OPENSSL_VERSION_NUMBER >=0x10100000L - OPENSSL_init_crypto(OPENSSL_INIT_ADD_ALL_CIPHERS | OPENSSL_INIT_ADD_ALL_DIGESTS | - OPENSSL_INIT_LOAD_CONFIG | OPENSSL_INIT_ENGINE_OPENSSL | OPENSSL_INIT_ENGINE_ALL_BUILTIN , NULL); - OPENSSL_init_ssl(OPENSSL_INIT_LOAD_SSL_STRINGS, NULL); + vmime_uint64 flags = OPENSSL_INIT_LOAD_SSL_STRINGS | OPENSSL_INIT_LOAD_CONFIG; + if (!isFIPSenabled) { + flags |= OPENSSL_INIT_ENGINE_OPENSSL | OPENSSL_INIT_ENGINE_ALL_BUILTIN; + } + OPENSSL_init_ssl(flags, NULL); #endif #if OPENSSL_VERSION_NUMBER < 0x10100000L diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vmime-0.9.2+g188/src/vmime/utility/url.cpp new/vmime-0.9.2+g191/src/vmime/utility/url.cpp --- old/vmime-0.9.2+g188/src/vmime/utility/url.cpp 2024-01-30 12:41:49.000000000 +0100 +++ new/vmime-0.9.2+g191/src/vmime/utility/url.cpp 2024-03-04 11:48:48.000000000 +0100 @@ -180,7 +180,7 @@ host.assign(&hostPart[1], len - 1); - if (hostPart[len] == '\0') { + if (hostPart[len + 1] == '\0') { return true; } if (hostPart[len + 1] != ':') { @@ -274,9 +274,20 @@ extractHost(hostPart, host, port); // Path - string path = utility::stringUtils::trim(string(str.begin() + slashPos, str.end())); + string path; string params; + if (slashPos != str.size()) { + + // Cf. RFC 1738 §3.1 page 6. For all URLs that follow Common + // Internet Scheme Syntax (and this parser demands it by only + // allowing URLs with "://" above), the separator is not + // actually part of the path. + auto pathStart = slashPos + 1; + path = utility::stringUtils::trim(string(str.begin() + pathStart, str.end())); + + } + size_t paramSep = path.find_first_of('?'); if (paramSep != string::npos) { @@ -285,10 +296,6 @@ path.erase(path.begin() + paramSep, path.end()); } - if (path == "/") { - path.clear(); - } - // Some sanity check if (proto.empty()) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vmime-0.9.2+g188/tests/utility/urlTest.cpp new/vmime-0.9.2+g191/tests/utility/urlTest.cpp --- old/vmime-0.9.2+g188/tests/utility/urlTest.cpp 2024-01-30 12:41:49.000000000 +0100 +++ new/vmime-0.9.2+g191/tests/utility/urlTest.cpp 2024-03-04 11:48:48.000000000 +0100 @@ -35,7 +35,8 @@ VMIME_TEST(testParse3) VMIME_TEST(testParse4) VMIME_TEST(testParse5) - VMIME_TEST(testParseIPv6) + VMIME_TEST(testParseIPv6Full) + VMIME_TEST(testParseIPv6NoPort) VMIME_TEST(testGenerate) VMIME_TEST(testUtilsEncode) VMIME_TEST(testUtilsDecode) @@ -71,7 +72,7 @@ VASSERT_EQ("1.4", "password", u1.getPassword()); VASSERT_EQ("1.5", "host", u1.getHost()); VASSERT_EQ("1.6", 12345, u1.getPort()); - VASSERT_EQ("1.7", "/path/", u1.getPath()); + VASSERT_EQ("1.7", "path/", u1.getPath()); vmime::utility::url u2("", ""); @@ -81,7 +82,7 @@ VASSERT_EQ("2.4", "", u2.getPassword()); VASSERT_EQ("2.5", "host", u2.getHost()); VASSERT_EQ("2.6", 12345, u2.getPort()); - VASSERT_EQ("2.7", "/path/", u2.getPath()); + VASSERT_EQ("2.7", "path/", u2.getPath()); vmime::utility::url u3("", ""); @@ -91,7 +92,7 @@ VASSERT_EQ("3.4", "", u3.getPassword()); VASSERT_EQ("3.5", "host", u3.getHost()); VASSERT_EQ("3.6", 12345, u3.getPort()); - VASSERT_EQ("3.7", "/path/", u3.getPath()); + VASSERT_EQ("3.7", "path/", u3.getPath()); vmime::utility::url u4("", ""); @@ -101,7 +102,7 @@ VASSERT_EQ("4.4", "", u4.getPassword()); VASSERT_EQ("4.5", "host", u4.getHost()); VASSERT_EQ("4.6", vmime::utility::url::UNSPECIFIED_PORT, u4.getPort()); - VASSERT_EQ("4.7", "/path/", u4.getPath()); + VASSERT_EQ("4.7", "path/", u4.getPath()); vmime::utility::url u5("", ""); @@ -121,7 +122,7 @@ VASSERT_EQ("6.4", "", u4.getPassword()); VASSERT_EQ("6.5", "host", u4.getHost()); VASSERT_EQ("6.6", vmime::utility::url::UNSPECIFIED_PORT, u4.getPort()); - VASSERT_EQ("6.7", "/path/file", u4.getPath()); + VASSERT_EQ("6.7", "path/file", u4.getPath()); } void testParse2() { @@ -156,7 +157,7 @@ VASSERT_EQ("1.4", "pass\x56word", u1.getPassword()); VASSERT_EQ("1.5", "ho\x78st", u1.getHost()); VASSERT_EQ("1.6", 12345, u1.getPort()); - VASSERT_EQ("1.7", "/pa\xabth/", u1.getPath()); + VASSERT_EQ("1.7", "pa\xabth/", u1.getPath()); } void testParse4() { @@ -167,14 +168,14 @@ VASSERT_EQ("1.1", true, parseHelper(u1, "proto://host/path?p1=v1&p2=v2")); VASSERT_EQ("1.2", "v1", u1.getParams()["p1"]); VASSERT_EQ("1.3", "v2", u1.getParams()["p2"]); - VASSERT_EQ("1.4", "/path", u1.getPath()); + VASSERT_EQ("1.4", "path", u1.getPath()); vmime::utility::url u2("", ""); VASSERT_EQ("2.1", true, parseHelper(u2, "proto://host/path?p1=v1&p2")); VASSERT_EQ("2.2", "v1", u2.getParams()["p1"]); VASSERT_EQ("2.3", "p2", u2.getParams()["p2"]); - VASSERT_EQ("2.4", "/path", u2.getPath()); + VASSERT_EQ("2.4", "path", u2.getPath()); vmime::utility::url u3("", ""); @@ -188,7 +189,7 @@ VASSERT_EQ("4.1", true, parseHelper(u4, "proto://host/path?p1=%3D&%3D=v2")); VASSERT_EQ("4.2", "=", u4.getParams()["p1"]); VASSERT_EQ("4.3", "v2", u4.getParams()["="]); - VASSERT_EQ("4.4", "/path", u4.getPath()); + VASSERT_EQ("4.4", "path", u4.getPath()); } // '@' symbol in the username part @@ -202,7 +203,7 @@ VASSERT_EQ("4", "myserver.com", u1.getHost()); } - void testParseIPv6() { + void testParseIPv6Full() { vmime::utility::url u1("", ""); @@ -211,7 +212,15 @@ VASSERT_EQ("3", "b", u1.getPassword()); VASSERT_EQ("4", "::1", u1.getHost()); VASSERT_EQ("5", 80, u1.getPort()); - VASSERT_EQ("6", "/p", u1.getPath()); + VASSERT_EQ("6", "p", u1.getPath()); + } + + void testParseIPv6NoPort() { + + vmime::utility::url u1("", ""); + + VASSERT_EQ("1", true, parseHelper(u1, "http://[::1]/")); + VASSERT_EQ("2", "::1", u1.getHost()); } void testGenerate() {
