• Do not register here on develop.twiki.org, login with your twiki.org account.
• Use View topic Item7848 for generic doc work for TWiki-6.1.1. Use View topic Item7851 for doc work on extensions that are not part of a release. More... Close
• Anything you create or change in standard webs (Main, TWiki, Sandbox etc) will be automatically reverted on every SVN update.
Does this site look broken?. Use the LitterTray web for test cases.

Item4906: Attachment renaming insufficient when filename contains square brackets

Item Form Data

AppliesTo: Component: Priority: CurrentState: WaitingFor: TargetRelease ReleasedIn
Engine   Normal Confirmed   n/a  

Edit Form Data

Summary:
Reported By:
Codebase:
Applies To:
Component:
Priority:
Current State:
Waiting For:
Target Release:
Released In:
 

Detail

When a filename contains a wikiword surrounded by parenthesizes is attached to a page. It messes up the file attachment table. The only way to fix it is remove it from the table manually by directly editing the page source through ftp.

-- TWiki:Main/KeWang - 29 Oct 2007

is this bug still present in 4.2.0?

-- SvenDowideit - 06 Dec 2007

I do not have an install of 4.2.0 to test it on. If anyone has 4.2.0, please test this out and give us update here.

-- TWiki:Main.KeWang - 14 Dec 2007

Well, we have 4.2 here...

I don't see anything wrong on LitterTray.AtachmentWithParentheses.

-- TWiki:Main.ArthurClemens - 14 Dec 2007

Try uploading a filename like

Existing(WebChanges)And(NonExisting)And([[ForcedName]])Not[[InParanthesis]]FilenameWithA(WikiName)And( SpacedOut ).txt

And it will show the effect - the filename could be entity-escaped, noautolinked or similar to avoid the rendering effects.

- It is currently not possible to upload to dto due to the "Use of uninitialized value in hash element at (eval 98) line 3."-error reported elsewhere, so can't demonstrate.

-- TWiki:Main.SteffenPoulsen - 15 Dec 2007

Yes, the renamed messages says:

The file has been uploaded and attached properly to the AtachmentWithParentheses topic. However, the filename has been changed from Existing(WebChanges)And(NonExisting? )And([[ForcedName]])Not[[InParanthesis]]FilenameWithA(WikiName? )And( SpacedOut? ).txt to Existing(WebChanges)And(NonExisting? )And([[ForcedName]])Not[[InParanthesis]]FilenameWithA(WikiName? )And(_SpacedOut_).txt. Please make a note of it.

I have updated the summary to better describe this bug.

-- TWiki:Main.ArthurClemens - 17 Dec 2007

One strategy is to prevent the rendering, a. la.:

Another to rename the file after upload. I think the first is the best one, it covers existing files as well?

-- TWiki:Main.SteffenPoulsen - 22 Dec 2007

Not sure if this is still relevant, but you don't need square brackets to error the thing out. A simple filename like

TestingThis(JustParenthesizes).txt
would not work either as you can see at AtachmentWithParentheses. I currently have the rename rules to take out parenthesizes out of any filenames which seems to fix the issue but isn't a very good work around. A fix at the rendering level would be ideal imo.

-- TWiki:Main.KeWang - 22 Dec 2007

I have no problems with Parentheses, however a filename such as #5b.txt has some odd behaviors.

  • if you go to manage the file, you can not modify properties. The "Change comment and properties only" button does not even show up, nor does an option to delete it.
  • the automatically generated URL for downloading the document from the wiki page also fails #5b.txt: #5b.txt will lead you to an error page, because the link terminates at the pound symbol and TWiki 4.1.5 is trying to access the pub/WEB/PageName/ directory.

-- TWiki:Main.AJAlfieriCrispin - 18 Mar 2008

Correction, you only get an error if your apache is configured to disallow directory browsing... BTW, do you want directory browsing allowed on this site?

-- TWiki:Main.AJAlfieriCrispin - 18 Mar 2008

yeah, its ben useful once or twice when people try to track down bugs

-- TWiki:Main.SvenDowideit - 31 Mar 2008

ItemTemplate
Summary Attachment renaming insufficient when filename contains square brackets
ReportedBy TWiki:Main.KeWang
Codebase 4.1.2
SVN Range TWiki-4.3.0, Fri, 12 Oct 2007, build 15261
AppliesTo Engine
Component

Priority Normal
CurrentState Confirmed
WaitingFor

Checkins

TargetRelease n/a
ReleasedIn

Topic attachments
I Attachment History Action Size Date Who Comment
Texttxt prevent_filename_rendering_patch.txt r1 manage 2.7 K 2007-12-22 - 20:06 UnknownUser patch against r16093
Edit | Attach | Watch | Print version | History: r10 < r9 < r8 < r7 < r6 | Backlinks | Raw View |  Raw edit | More topic actions
Topic revision: r10 - 2008-03-31 - SvenDowideit
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2023 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback