Skip to Content Skip to Menu

No error on exceeding max file upload size - image field

  • lucvdr
  • lucvdr
  • OFFLINE
  • Posts: 12
  • Thanks: 1
  • Karma: 0
10 years 2 months ago #247546 by lucvdr
Joomla! 2.5.24
CB 1.9

I have a field of the IMAGE type.
Max upload size in the field parameters is set to 4000 kb.
Also, in the general cb configuration image tab, max image file size is ste to 4000 kb.

However, when a user does a profile edit and loads a file of 8mb, the system does not give an error. On the contrary: the system says: "Your settings have been saved."
Note that although the system says it has been saved, the image of 8MB is not saved. It doesn't doe the upload (which is good) but it does not give an error message - not good!

Please Log in or Create an account to join the conversation.

  • nant
  • nant
  • OFFLINE
  • Posts: 12339
  • Thanks: 1467
  • Karma: 877
10 years 2 months ago #247548 by nant

lucvdr wrote: Joomla! 2.5.24
CB 1.9


CB 1.9.1 is required for Joomla 2.5.24.

Please Log in or Create an account to join the conversation.

  • lucvdr
  • lucvdr
  • OFFLINE
  • Posts: 12
  • Thanks: 1
  • Karma: 0
10 years 2 months ago #247550 by lucvdr
correct, my mistake: I have 1.9.1 running

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • OFFLINE
  • Posts: 48419
  • Thanks: 8274
  • Karma: 1443
10 years 2 months ago #247560 by krileon
Image fields in 1.x are missing the filesize validation test before passing to image processing library. While the image processing will reject it the result of it rejecting it won't produce an error (silently fails). This is fixed in CB 2.0 were it'll do the filesize validation test before even attempting to process the image.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in or Create an account to join the conversation.

  • lucvdr
  • lucvdr
  • OFFLINE
  • Posts: 12
  • Thanks: 1
  • Karma: 0
10 years 2 months ago #247588 by lucvdr
better to have a fix in 1.9.1 ...
the 2.0 version is - as the cb team states - "not a stable release and this is not recommended for live production sites"

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • OFFLINE
  • Posts: 48419
  • Thanks: 8274
  • Karma: 1443
10 years 2 months ago #247619 by krileon
Checking source the filesize check is there, but doesn't seam to be working. Please apply the below quickfix to see if the issue resolves.

IN: components/com_comprofiler/plugin/user/plug_cbcore/cb.core.php
ON: Line 2695
FROM:
Code:
if ( filesize( $value['tmp_name'] ) > ( $maxSize * 1024 ) ) {
TO:
Code:
if ( ( $value['size'] / 1024 ) > $maxSize ) {


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum