Unable to attach Serial Download to Product

  • Posts: 22
  • Thank you received: 3
9 years 2 months ago #187535

-- HikaShop version -- : 2.3.5
-- HikaSerial version -- : 1.9.0
-- Joomla version -- : 3.3.6
-- PHP version -- : 5.3.28
-- Browser(s) name and version -- : Chrome 39.0.2171.99 m IE 11
-- Error-message(debug-mod must be tuned on) -- : Blank Page

When trying to attach a serial download to a product, I'm just getting a blank page in the popup.
This was working previously, but recently has now stopped.
I've set to Debug and Maximum, but I only get the Joomla Debug output and no error messages above it.

Attachments:

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

  • Posts: 26000
  • Thank you received: 4004
  • MODERATOR
9 years 2 months ago #187537

Hi,

Yes, it's a bug I already reported to the team but I don't know if the latest HikaShop 2.3.5 contain the fix (but it will in the next release).
You can edit the file "administrator/components/com_hikashop/controllers/product.php" and use that code in the _saveFile function

		switch($filemode) {
			case 'path':
				$file->file_path = $formData['filepath'];

				if(strpos($file->file_path, '..') !== false)
					return false;

				$firstChar = substr($file->file_path,0,1);
				if(substr($file->file_path, 0, 7) != 'http://' && substr($file->file_path, 0, 8) != 'https://' && !in_array($firstChar, array('#','@'))) {
					$config =& hikashop_config();
					$clean_filename = JPath::clean($file->file_path);
					$secure_path = $config->get('uploadsecurefolder');
					if((JPATH_ROOT != '') && strpos($clean_filename, JPath::clean(JPATH_ROOT)) !== 0 && strpos($clean_filename, JPath::clean($secure_path)) !== 0)
						return false;
				}
				break;

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

Moderators: Obsidev
Time to create page: 0.061 seconds
Powered by Kunena Forum