Item2337: ATTACHFILESIZELIMIT check fails confusingly if value is "0 "

Priority: Normal
Current State: Closed
Released In: 1.0.9
Target Release: patch
Applies To: Engine
Component: UI/Upload
Reported By: DiabJerius
Waiting For:
Last Change By: OlivierRaginel
If the user mistakenly sets ATTACHFILESIZELIMIT to the string "0 ", the file size check fails, but with a confusing error:

"Oversized file foo exceeds limit of 0  Kb.

Since there's no real visual clue that there's an extra space, this can cause some frustration. The attached patch strips trailing spaces from the value. I presume this is not done by the preference macro parsing code because trailing spaces might be useful in some contexts.

The UploadPlugin has the same issue.

Can't confirm the issue for UploadPlugin: Setting ATTACHFILESIZELIMIT to 0 disables the check all together.

-- MichaelDaum - 17 Nov 2009

Did you try the string "0 " (note the space at the end)?

-- DiabJerius - 16 Jan 2010

Was an easy fix. It is possible to add trailing spaces if you accidently edit a settings topic with Wysiwyg and the wrong browser so this is why I found it worth fixing in 1.0.9

-- KennethLavrsen - 17 Jan 2010

Re-opening because this has been fixed properly in the release branch, but the fix in trunk is wrong. So re-opening and fixing will NOT disrupt the release process, as this bug is closed, and has been closed for 1.0.9.

-- OlivierRaginel - 19 Jan 2010

ItemTemplate edit

Summary ATTACHFILESIZELIMIT check fails confusingly if value is "0 "
ReportedBy DiabJerius
Codebase 1.0.7
SVN Range Foswiki-1.0.7, Sun, 20 Sep 2009, build 5061
AppliesTo Engine
Component UI/Upload
Priority Normal
CurrentState Closed
Checkins distro:4f3fca6eb3cb distro:7381007f6216 distro:9d09303a4346 distro:32372137aaca distro:0ca07a002d55 distro:aea8439799ca distro:75b77c17fad3
TargetRelease patch
ReleasedIn 1.0.9
Topic attachments
I Attachment Action Size Date Who Comment
attachsize.patchpatch attachsize.patch manage 436 bytes 07 Nov 2009 - 20:30 DiabJerius  
Topic revision: r12 - 19 Jan 2010, OlivierRaginel - This page was cached on 17 Oct 2018 - 16:16.

The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy