Last modified: 2014-06-09 12:16:45 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T68324, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 66324 - fix double encoding by implicit cast from String to Url
fix double encoding by implicit cast from String to Url
Status: RESOLVED FIXED
Product: Huggle
Classification: Unclassified
Application (Other open bugs)
trunk
All All
: Normal normal
: ---
Assigned To: Peter Bena
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-06-07 16:00 UTC by se4598
Modified: 2014-06-09 12:16 UTC (History)
3 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description se4598 2014-06-07 16:00:59 UTC
at several locations in the code there is
> QDesktopServices::openUrl(QString(<xxx>+<yyy>));
where xxx and yyy two strings. Apart from creating a new string from a string,
openUrl only accepts a QUrl. Thus QT automatically casts the whole url-QString to QUrl using presumably
> QUrl::QUrl ( const QString & url )
which automatically percent encode all characters (of the whole url).

On some locations there are parameters also percent encoded prior adding them to the url which results in double encoding.

using the following in our huggle.pro prevents the implicit cast for the future (or similiar for non-qmake)
> DEFINES += QT_NO_URL_CAST_FROM_STRING

see also https://github.com/huggle/huggle3-qt-lx/pull/68
Comment 1 Peter Bena 2014-06-09 08:39:49 UTC
what's the point of setting up that define? what about explicitly doing this cast ourselve? We need to do that either way.
Comment 2 Peter Bena 2014-06-09 12:16:45 UTC
http://git.io/HmCe8w

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links