Porting KUrl::prettyUrl: please do not reintroduce CVE-2013-2074!

Dawit A adawit at kde.org
Fri Oct 17 05:04:26 BST 2014


I personally think QUrl should remove the password by default when
converting to string and force caller of the API to explicitly request the
inclusion of the password say by changing the modifier option to a
QUrl::IncludePassword. It is better to be safer out of the box.

On Thu, Oct 16, 2014 at 8:53 PM, Kevin Kofler <kevin.kofler at chello.at>
wrote:

> Hi,
>
> just a small public service announcement: The correct replacement for:
> url.prettyUrl()
> in Qt 5 is NOT:
> url.toString() // BAD!
> but:
> url.toString(QUrl::RemovePassword)
>
> The old KUrl::prettyUrl() always removed passwords. You DON'T want to show
> passwords in user output:
> http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2013-2074
>
> (I found this reviewing the initial port of Kompare.)
>
> Thanks for reading,
>         Kevin Kofler
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20141017/cde609e8/attachment.htm>


More information about the kde-core-devel mailing list