Dandello Forum AdministratorYaBB Modder Offline I love YaBB 2.7! Posts: 2235 Location: The Land of YaBB Joined: Feb 12th, 2014 Gender: Mood: Annoyed Zodiac sign: 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. WWW IP Logged
Dandello Forum AdministratorYaBB Modder Offline I love YaBB 2.7! Posts: 2235 Location: The Land of YaBB Joined: Feb 12th, 2014 Gender: Mood: Annoyed Zodiac sign: 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. WWW IP Logged
Dandello Forum AdministratorYaBB Modder Offline I love YaBB 2.7! Posts: 2235 Location: The Land of YaBB Joined: Feb 12th, 2014 Gender: Mood: Annoyed Zodiac sign: 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 findCode (Perl) $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) $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. Perfection is not possible. Excellence, however, is excellent. WWW IP Logged