This site requires JavaScript, please enable it in your browser!
Greenfoot back
DonaldDuck
DonaldDuck wrote ...

2011/10/31

Security Issues?

DonaldDuck DonaldDuck

2011/10/31

#
Hi, I know that Gallery is really strict with security measures, and rightfully so, but surely you can allow text to be copied? I've been messing with JFrames, JOptionPanes, JTextFields, JTextAreas and JLabels, but not one of them allowed any text to be copied. Exception in thread "AWT-EventQueue-5" java.lang.NullPointerException at java.awt.LightweightDispatcher$3.run(Unknown Source) at java.awt.event.InvocationEvent.dispatch(Unknown Source) at java.awt.EventQueue.dispatchEventImpl(Unknown Source) at java.awt.EventQueue.access$000(Unknown Source) at java.awt.EventQueue$1.run(Unknown Source) at java.awt.EventQueue$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source) at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source) at java.awt.EventQueue$2.run(Unknown Source) at java.awt.EventQueue$2.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source) at java.awt.EventQueue.dispatchEvent(Unknown Source) at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.run(Unknown Source) This is the error I get when I try to use code to use the selectAll() method in JTextFields, and the Gallery also blocks me from manually selecting text and copying it. Is there any way you guys (The Greenfoot Developers) can change this? I don't see how it can be a security threat if the user copies the text voluntarily...
davmac davmac

2011/10/31

#
It's not something the Greenfoot developers did, but rather it's a general measure in Java. No Java applets (whether they're on the Gallery or anywhere else) can copy stuff into the clipboard unless they are signed and the user has the appropriate privileges granted in their certificate database - both of these things are difficult to arrange and we (the Greenfoot developers) can't control it.
DonaldDuck DonaldDuck

2011/10/31

#
Ah, I see. Sorry for the incorrect accusation.
You need to login to post a reply.