Changeset View
Changeset View
Standalone View
Standalone View
src/ioslaves/http/kcookiejar/kcookiejar.cpp
Show All 37 Lines | |||||
38 | 38 | | |||
39 | #include <kconfig.h> | 39 | #include <kconfig.h> | ||
40 | #include <kconfiggroup.h> | 40 | #include <kconfiggroup.h> | ||
41 | #include <qsavefile.h> | 41 | #include <qsavefile.h> | ||
42 | #include <QDebug> | 42 | #include <QDebug> | ||
43 | 43 | | |||
44 | #include <QString> | 44 | #include <QString> | ||
45 | #include <QFile> | 45 | #include <QFile> | ||
46 | #include <QRegExp> | 46 | #include <QRegularExpression> | ||
47 | #include <QTextStream> | 47 | #include <QTextStream> | ||
48 | #include <QLocale> | 48 | #include <QLocale> | ||
49 | #include <QUrl> | 49 | #include <QUrl> | ||
50 | 50 | | |||
51 | Q_LOGGING_CATEGORY(KIO_COOKIEJAR, "kf5.kio.cookiejar") | 51 | Q_LOGGING_CATEGORY(KIO_COOKIEJAR, "kf5.kio.cookiejar") | ||
52 | 52 | | |||
53 | // BR87227 | 53 | // BR87227 | ||
54 | // Waba: Should the number of cookies be limited? | 54 | // Waba: Should the number of cookies be limited? | ||
▲ Show 20 Lines • Show All 569 Lines • ▼ Show 20 Line(s) | 620 | { | |||
624 | } | 624 | } | ||
625 | 625 | | |||
626 | // Return numeric IPv6 addresses as is... | 626 | // Return numeric IPv6 addresses as is... | ||
627 | if (_fqdn[0] == QL1C('[')) { | 627 | if (_fqdn[0] == QL1C('[')) { | ||
628 | _domains.append(_fqdn); | 628 | _domains.append(_fqdn); | ||
629 | return; | 629 | return; | ||
630 | } | 630 | } | ||
631 | // Return numeric IPv4 addresses as is... | 631 | // Return numeric IPv4 addresses as is... | ||
632 | if (_fqdn[0] >= QL1C('0') && _fqdn[0] <= QL1C('9') && _fqdn.indexOf(QRegExp(QStringLiteral(IP_ADDRESS_EXPRESSION))) > -1) { | 632 | if (_fqdn[0] >= QL1C('0') && _fqdn[0] <= QL1C('9') | ||
633 | && _fqdn.indexOf(QRegularExpression(QStringLiteral(IP_ADDRESS_EXPRESSION))) > -1) { | ||||
633 | _domains.append(_fqdn); | 634 | _domains.append(_fqdn); | ||
634 | return; | 635 | return; | ||
635 | } | 636 | } | ||
636 | 637 | | |||
637 | // Always add the FQDN at the start of the list for | 638 | // Always add the FQDN at the start of the list for | ||
638 | // hostname == cookie-domainname checks! | 639 | // hostname == cookie-domainname checks! | ||
639 | _domains.append(_fqdn); | 640 | _domains.append(_fqdn); | ||
640 | _domains.append(QL1C('.') + _fqdn); | 641 | _domains.append(QL1C('.') + _fqdn); | ||
▲ Show 20 Lines • Show All 974 Lines • Show Last 20 Lines |