Ticket #1177 (closed defect: fixed)

Opened 4 years ago

Last modified 4 years ago

[TiddlyWebWiki] double-encoding in ServerSideSavingPlugin

Reported by: jdlrobson Owned by: jdlrobson
Priority: major Milestone:
Component: TiddlyWebWiki Version:
Severity: medium Keywords:
Cc:

Description (last modified by FND) (diff)

I noticed an error in saving.

To replicate this error you will need:

  • 1 bag with a name jdlrobson%40gmail.com (the unencoded form of this is jdlrobson@gmail.com)
  • up to date tiddlyweb and tiddlywebwiki
  • a recipe referencing the bag jdlrobson@gmail.com and the system bag with the correct permissioning to allow you to edit

Create a tiddler in this new bag with Firebug open. You will notice it saves correctly. Click edit and try again. This time a 412 is thrown saying the ETag is incorrect.

Looking more closely you will notice that normalizeTitle normalises the field server.bag on the tiddler (in TiddlyWebAdaptor?). Somehow this also modifies the tiddler object itself so now that tiddler has a field server.bag with value jdlrobson%40gmail.com.

When you save a second or third time, it tries to normalise yet again, which then causes an error.

One slightly hacky way which solves the problem is to add:

if(context && context.tiddler && context.tiddler.fields['server.workspace'])context.tiddler.fields['server.workspace'] = decodeURIComponent(context.tiddler.fields['server.workspace']);

to saveTiddlerCallback. This resets the field that has been modified. Sure there is a better solution out there though.

Change History

Changed 4 years ago by FND

  • owner changed from developer to FND
  • status changed from new to assigned
  • component changed from plugin to TiddlyWebWiki
  • description modified (diff)
  • summary changed from [TiddlyWeb][TiddlyWiki]Double encoding in ServerSideSavingPlugin to [TiddlyWebWiki] double-encoding in ServerSideSavingPlugin

Changed 4 years ago by FND

  • keywords tiddlyweb ServerSideSavingPlugin TiddlyWebWiki TiddlyWebAdaptor removed
  • priority changed from minor to major
  • version 2.5.02 deleted
  • milestone TiddlyWeb 1.0 final deleted

Changed 4 years ago by FND

  • owner changed from FND to jdlrobson
  • status changed from assigned to new

fixed in changeset:11206

reassigning for review

Changed 4 years ago by jdlrobson

  • status changed from new to assigned

Changed 4 years ago by jdlrobson

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

Changed 4 years ago by FND

  • status changed from closed to reopened
  • resolution worksforme deleted

Changed 4 years ago by FND

  • status changed from reopened to closed
  • resolution set to fixed
Note: See TracTickets for help on using tickets.