[PyQt] Bug with empty string in QWebPage::javaScriptPrompt

Phil Thompson phil at riverbankcomputing.com
Sun Jun 15 12:38:56 BST 2014


On 15/06/2014 12:30 pm, Florian Bruhin wrote:
> * Phil Thompson <phil at riverbankcomputing.com> [2014-06-15 12:24:08 
> +0100]:
>> On 14/06/2014 8:59 pm, Florian Bruhin wrote:
>> >I think I found a bug with QWebPage::javaScriptPrompt using
>> >Qt/PyQt 5.2.1, Qt runtime 5.3.0 and Python 3.4.
>> >
>> >When overriding QWebPage::javaScriptPrompt and returning an empty
>> >string, javascript gets some random RAM content back it seems. This
>> >also might be a security issue...
>> >
>> >When I run super().javaScriptPrompt, (True, '') is returned when I
>> >enter an empty string in the dialog as well, so what I return seems to
>> >be correct.
>> 
>> It's a code generation bug - fixed in tonight's SIP snapshot.
> 
> Is there any way I could work around it, except not overriding
> javaScriptPrompt?

No.

> Also, any idea in which PyQt-version it appeared, and in which it'll
> probably be gone in distribution packets? 5.4?

It's probably been there for years. I can't speak for distributions.

Phil


More information about the PyQt mailing list