As designed Maximum large avatar file size (bytes)

Hello,
I am using Xenforo 1.3

When I set Maximum large avatar file size (bytes): 51200 and upload an avatar image much bigger than that I don't get an error message.

Prerequisites:
Set the Maximum large avatar file size (bytes) for a user group as 51200

Steps to reproduce:
  1. Go to the site
  2. Login
  3. Go to manage account settings
  4. View the copy next to the avatar upload
  5. Upload an image larger than 51200 bytes
Actual result: Upload is successful, avatar changed

Expected result : User should get an error saying that the file uploaded is too large.

Notes: I took a quick peek at Xenforo/Model/Avatar.php and it looks like the comparison is being done against the final output rather than the size of the actual image that is being uploaded. Is this intended please?

Thanks in advance
 
The checks are against the final image, post alterations done by the upload process (resize, etc). You will only receive the error if the final image is above the threshold.
 
Notes: I took a quick peek at Xenforo/Model/Avatar.php and it looks like the comparison is being done against the final output rather than the size of the actual image that is being uploaded. Is this intended please?
Yes, this is desired. It's designed to prevent files above certain sizes being output/used.
 
Back
Top Bottom