bugSavane - Bugs: bug #2053, Change message when attaching a...

 
 
Show feedback again

You are not allowed to post comments on this tracker with your current authentification level.

bug #2053: Change message when attaching a file that is too much big

Submitted by:  Sylvain Beucler <beuc>
Submitted on:  Fri 04 Mar 2005 07:09:01 PM UTC  
 
Category: Web Frontend: TrackersStatus: Fixed
Severity: 3 - NormalPriority: A - Later
Assigned to: Tobias Quathamer <toddy>Open/Closed: Closed
Release: Planned Release: 1.0.8
Reproducibility: NonePrivacy: Public

Thu 30 Jun 2005 06:31:39 PM UTC, comment #2:

> - adding the size detected by filesize() in the first case


Done.

> - remove references to character escaping


I've not touched that.

> - use bytes instead of characters
> - switch to kB/MB


Done.

> Btw, why do files must be bigger than 20 chars?


I've removed this restriction.

Tobias Quathamer <toddy>
Project MemberIn charge of this item.
Fri 04 Mar 2005 07:25:18 PM UTC, comment #1:

- adding the size detected by filesize() in the first case

Why not, but doesnt it risk to be even more confusing, since it's an unescaped size?
This preliminary test is mainly here to avoid having someone exhausting the server by escaping a gigantic file.

- remove references to character escaping

No: it was not existing in the past and was subject to enough users complains to it has been added

- use bytes instead of characters .
- switch to kB/MB

Indeed, that would be better.

- Btw, why do files must be bigger than 20 chars?

I guess the original author of the tracker estimated that submitting files smaller than 20 chars was not a good idea.

But that restriction is probably completely useless and increase user confusion, so I would tend to think we should remove it.

Mathieu Roy <yeupou>
Project Administrator
Fri 04 Mar 2005 07:09:01 PM UTC, original submission:

The message you get when you post a file that is too much big is not perfectly clear for end users.

I suggest:
- adding the size detected by filesize() in the first case
- remove references to character escaping
- use bytes instead of characters
- switch to kB/MB

Btw, why do files must be bigger than 20 chars?

frontend/php/include/trackers/general.php:

# Check file size:
# - first with filesize(), that can result appropriate result for big files
# unlike strlen. If it is too big, we stop here.
# - then with strlen after the call the addslashes(): the check must be
# made on the final size for import in the database.
#
if (filesize($input_file) > 512000) {
fb(_("File not attached: must be > 20 chars and < 512000 chars in length, after escaping characters as required."), 1);
return false;
}
$data = addslashes(fread($data, filesize($input_file)));
if ((strlen($data) < 20) || (strlen($data) > 512000))
{
fb(sprintf(_("File not attached: must be > 20 chars and < 512000 chars in length. After escaping characters as required, it sized %s."), strlen($data)), 1);
return false;
}

Sylvain Beucler <beuc>
Project Administrator

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one

Digest:
   task dependencies.

 

Carbon-Copy List
  • -unavailable- added by toddy (Updated the item)
  • -unavailable- added by yeupou (Posted a comment)
  • -unavailable- added by beuc (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 30 Jun 2005 06:31:39 PM UTCtoddyStatusNone=>Fixed
      Assigned toNone=>toddy
      Open/ClosedOpen=>Closed
      Planned Release=>1.0.8
    Show feedback again

    Back to the top


    Powered by Savane 3.1-cleanup