Ticket #253 (closed defect: fixed)

Opened 6 years ago

Last modified 6 years ago

TiddlySaver needs changes for Opera9.00 and Opera9.02 under GenToo Linux with jdk1.5.0_06

Reported by: thomaskammeyer Owned by: UdoBorkowski
Priority: undefined Milestone:
Component: TiddlySaver Version:
Severity: high Keywords:
Cc:

Description

I'm using the most recently available 2.1.3 with the most recently available TiddlySaver? as of about Nov. 20, 2006. I've posted this to TiddlyWiki group at google, but then realized that the thread was somewhat old and that it would've more properly gone to TiddlyWikiDev?. So I checked out the source from subversion and looked into it.

No matter what policy file you use when using TiddlyWiki in the configuration given in the short summary, you'll find write permission is always denied. The problems seems to be changes to security in the JDK1.5.0 and possibly Opera for Linux's interaction with it (I'm note sure because I only have Opera running in this one configuration).

I poked at the Javascript source in TiddlyWiki and the TiddlySaver? Java code and realized that I couldn't get the problem to occur with a correct policy file when exercising TiddlySaver? from a Java application or a simple test applet made as a test rig run from the applet viewer. The test applet fails, however, when exercised in Opera.

Mitigating this requires that the save operation be executed by TiddlySaver? as a PrivilegedAction?. It seems to turn out to be easiest to derive a class from PrivilegedAction? and use it.

I do not know how this change will interact with other versions of the JVM.

I have a copy of the most recent source from subversion modified to wrap a privileged action derivative around the save operation. For cleanness, the same should probably be done with the load operation.

I'll be happy to provide that file if it would be helpful and any further details. My account should have an e-mail address specified. If that gives you problems, there's also my trac account name at gmail.com.

Attachments

TiddlySaver.java Download (2.3 KB) - added by thomaskammeyer 6 years ago.
TiddlySaver?.java source modified to use PriviligedAction?

Change History

Changed 6 years ago by thomaskammeyer

TiddlySaver?.java source modified to use PriviligedAction?

Changed 6 years ago by thomaskammeyer

I decided to just add the modified TiddlySaver? source as a file attachment.

Changed 6 years ago by UdoBorkowski

AndrewGregory? provided a similar fix at  http://my.opera.com/Andrew%20Gregory/blog/2006/12/03/update-tiddlywiki-java-saver

He also writes:

... the build script needs a small change: The jar command needs to refer to all class files, i.e. "TiddlySaver?*.class".

Changed 6 years ago by UdoBorkowski

  • status changed from new to assigned

Patch provided.

Changed 6 years ago by JeremyRuston

  • status changed from assigned to closed
  • resolution set to fixed

Fixed in changeset:1112

Note: See TracTickets for help on using tickets.