Page Index Toggle Pages: 1 ReplyAdd Poll Send Topic
Normal Topic attachment upload limits (Read 1601 times)
 
Paste Member Name in Quick Reply Box Dandello
Forum Administrator
YaBB Modder
*****
Offline


I love YaBB 2.7!

Posts: 2235
Location: The Land of YaBB
Joined: Feb 12th, 2014
Gender: Female
Mood: Annoyed
Zodiac sign: Virgo
attachment upload limits
Apr 18th, 2015 at 3:03pm
Mark & QuoteQuote  
There appears to be a problem with attachment upload size limits being ignored in 2.6.11.
With YaBBForum limits are checked on some file types and not on others. Here, all the file types I've checked have their sizes ignored. (Here, it may be due to a mod or some other change.)

The upload size limits work in 2.5.2 (although on testing I noticed some weirdness with how the error notice showed up).

I'll be doing more testing next week.
  

Perfection is not possible. Excellence, however, is excellent.
Back to top
WWW  
IP Logged
 
Paste Member Name in Quick Reply Box Dandello
Forum Administrator
YaBB Modder
*****
Offline


I love YaBB 2.7!

Posts: 2235
Location: The Land of YaBB
Joined: Feb 12th, 2014
Gender: Female
Mood: Annoyed
Zodiac sign: Virgo
Re: attachment upload limits
Reply #1 - Apr 18th, 2015 at 3:14pm
Mark & QuoteQuote  
On further testing - file upload limits on PM attachments appears to work properly.
  

Perfection is not possible. Excellence, however, is excellent.
Back to top
WWW  
IP Logged
 
Paste Member Name in Quick Reply Box Dandello
Forum Administrator
YaBB Modder
*****
Offline


I love YaBB 2.7!

Posts: 2235
Location: The Land of YaBB
Joined: Feb 12th, 2014
Gender: Female
Mood: Annoyed
Zodiac sign: Virgo
Re: attachment upload limits
Reply #2 - Apr 20th, 2015 at 1:10am
Mark & QuoteQuote  
Okay - no idea when this section got messed up but in Sources/Post.pm find
Code (Perl)
Select All
            $limit ||= 0;
             if ( $limit > 0  && $filesize > ( 1024 * $limit ) ) {
                 foreach (@filelist) { unlink "$uploaddir/$_"; }
             }
             $dirlimit ||= 0;
             if ($dirlimit > 0) {
                 my $dirsize = dirsize($uploaddir);
                 if ( $filesize > ( ( 1024 * $dirlimit ) - $dirsize ) ) {
                     foreach (@filelist) { unlink "$uploaddir/$_"; }
                  }
             } 



and replace with
Code (Perl)
Select All
            $limit ||= 0;
             if ( $limit > 0 && $filesize > ( 1024 * $limit ) ) {
                 foreach (@filelist) { unlink "$uploaddir/$_"; }
                 fatal_error( q{},
                         "$fatxt{'21'} $fixfile ("
                       . int( $filesize / 1024 )
                       . " KB) $fatxt{'21b'} "
                       . $limit );
             }
             $dirlimit ||= 0;
             if ( $dirlimit > 0 ) {
                 my $dirsize = dirsize($uploaddir);
                 if ( $filesize > ( ( 1024 * $dirlimit ) - $dirsize ) ) {
                     foreach (@filelist) { unlink "$uploaddir/$_"; }
                     fatal_error(
                         q{},
                         "$fatxt{'22'} $fixfile ("
                           . (
                             int( $filesize / 1024 ) -
                               $dirlimit +
                               int( $dirsize / 1024 )
                           )
                           . " KB) $fatxt{'22b'}"
                     );
                 }
             } 



I assume we were going to move the error sections into a separate sub.  Embarrassed
  

Perfection is not possible. Excellence, however, is excellent.
Back to top
WWW  
IP Logged
 
Page Index Toggle Pages: 1
ReplyAdd Poll Send Topic
Bookmarks: del.icio.us Digg Facebook Google LinkedIn reddit Twitter Yahoo
attachment upload limits

Please type the characters exactly as they appear in the image,
without the first 2 and last 2 characters.
The characters must be typed in the same order,
and they are case-sensitive.
Open Preview Preview

You can resize the textbox by dragging the right or bottom border.
Off Topic Comment Insert Spoiler
Insert Hyperlink Insert FTP Link Insert Image Insert E-mail Insert Media Insert Table Insert Table Row Insert Table Column Insert Horizontal Rule Insert Teletype Insert Code Insert Quote Edited Superscript Subscript Insert List /me - my name Insert Marquee Insert Timestamp No Parse
Bold Italicized Underline Insert Strikethrough Highlight
                       
Change Text Color
Insert Preformatted Text Left Align Centered Right Align
resize_wb
resize_hb







Max 5000 characters. Remaining characters:
Text size: %
More Smilies
View All Smilies
Collapse additional features Collapse/Expand additional features Smiley Wink Cheesy Grin Angry Sad Shocked Cool Huh Roll Eyes Tongue Embarrassed Lips Sealed Undecided Kiss Cry