Akregator feed detector plugin: Do not crash Konqueror for an invalid URL
ClosedPublic

Authored by marten on Apr 30 2018, 9:09 AM.

Details

Summary

As described in the second case in https://bugs.kde.org/show_bug.cgi?id=393496, this Konqueror plugin will crash with an assert within KProtocolManager if it is given (passed on command line, typed in address bar, clicked link etc) an invalid URL or one with an unknown protocol. This change fixes that by ensuring that the URL is valid before it is used.

KELibs4Support and its includes/classes are still used by this plugin. Porting them will follow in a separate review.

Test Plan

Built konqueror with this change. Observed no crash with the test cases as described in bug report, and correct operation of feed detection.

Diff Detail

Repository
R226 Konqueror
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
marten requested review of this revision.Apr 30 2018, 9:09 AM
marten created this revision.
dfaure accepted this revision.Apr 30 2018, 10:33 AM
dfaure added a subscriber: dfaure.
dfaure added inline comments.
plugins/akregator/konqfeedicon.cpp
105

This could be QUrl instead.

This revision is now accepted and ready to land.Apr 30 2018, 10:33 AM
marten added inline comments.Apr 30 2018, 1:59 PM
plugins/akregator/konqfeedicon.cpp
105

Will do a complete KUrl -> QUrl (and the rest of kdelibs4support) port in a separate review.

This revision was automatically updated to reflect the committed changes.