Uploaded image for project: 'Commons Jelly'
  1. Commons Jelly
  2. JELLY-90

SecurityException when using Jelly in applet or JAWS sandbox

VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.0-beta-4
    • core / taglib.core
    • None

    Description

      Using Jelly in a sandboxed Java Web Start application or an applet raises a SecurityException because a JellyContext calls system.getProperties() when it is initialized to set up the "systemScope" context variable.

      Placing that statement inside a try / catch block that swallows the SecurityException solves the problem for me.

      Of course this means that "systemScope" is unavailable in these contexts, but that seems to be a fair compromise, especially since findVariable() does a System.getProperty() as a last resort anyway (and this one is properly encased in a block that catches SecurityException).

      The relevant bit of code is JellyContext.init:

      private void init() {
      variables.put("context", this);
      try

      { variables.put("systemScope", System.getProperties()); }

      catch (SecurityException e)

      { // ignore security exceptions }

      }

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            Unassigned Unassigned
            jshowlett Scott Howlett
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 5m
                5m
                Remaining:
                Remaining Estimate - 5m
                5m
                Logged:
                Time Spent - Not Specified
                Not Specified

                Slack

                  Issue deployment