Details
-
Bug
-
Resolution: Fixed
-
P2: Important
-
5.0.2, 5.15.18, 6.2.13, 6.5.8, 6.7.3, 6.8.2, 6.9.0 RC
-
None
-
4
-
304a9664d (dev), 238a4eb17 (dev), 8bc8f26e3 (6.10), 279f480e9 (6.10), 8d08bc241 (6.9), 97a206400 (tqtc/lts-6.8)
-
Foundation Sprint 127, Foundation Sprint 128, Foundation Sprint 129, Foundation Sprint 130
Description
There was an assymmetry between comparesEqual() and qHash() that I was finally able to exploit: op== checks !d and d->isEmpty(), while qHash() only checks !d, and then goes over all the QString fields, hashing them.
This is a reproducer:
QUrl null; QUrl other; other.setFragment("meep"); other.setUrl(QString()); // doesn't overwrite d->fragment QCOMPARE_EQ(null, other); QCOMPARE_EQ(qHash(null), qHash(other)); // fails
Attachments
Issue Links
- relates to
-
QTBUG-134900 QUrl's operator==() is taking bygone data into account
-
- Closed
-
For Gerrit Dashboard: QTBUG-134896 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
654529,1 | QUrl: ensure setUrl() / operator=() erase any previous state | 6.9 | qt/qtbase | Status: NEW | 0 | 0 |
654647,1 | QUrl: fix comparisons of URLs with password but no explicit username | tqtc/lts-6.5 | qt/tqtc-qtbase | Status: NEW | +2 | 0 |