Security issue

  • Posts: 410
  • Thank you received: 15
5 years 6 months ago #298702

Hi. The subject was another, but I changed it. Is it dangerous (hackers) if there is dbquery in the file show.default.php? I also want to ask how to load something from a plugin I tried but did not allow me. Below is the plugin I made, there is a bug on the code I've corrected it but still does not want it.

Attachments:
Last edit: 5 years 6 months ago by neo191987.

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

  • Posts: 81481
  • Thank you received: 13062
  • MODERATOR
5 years 6 months ago #298705

Hi,

There is no echo of anything in your code, so it's normal it doesn't display anything.
Since you're apparently trying to display something on the product page using the onHikashopBeforeDisplayView trigger, you can look at the code we have in the plugins/hikashop/shippingmanual_prices/shippingmanual_prices.php file since that plugin can be configured to display the shipping fees of the products on the product page.
There, you'll also find a onHikashopBeforeDisplayView function and at the end of it, you can see that code:

if(!isset($view->element->extraData))
			$view->element->extraData = new stdClass();

		if(!isset($view->element->extraData->$position))
			$view->element->extraData->$position = array();
		array_push($view->element->extraData->$position, $data);
This code will add the html contained in the $data variable and add it in the position defined in the $position variable.
You can look at the XML file next to that PHP file to know the possible values you can have in $position:
<option value="topBegin">TOP_BEGIN</option>
			<option value="topEnd">TOP_END</option>
			<option value="leftBegin">LEFT_BEGIN</option>
			<option value="leftEnd">LEFT_END</option>
			<option value="rightBegin">RIGHT_BEGIN</option>
			<option value="rightMiddle">RIGHT_MIDDLE</option>
			<option value="rightEnd">RIGHT_END</option>
			<option value="bottomBegin">BOTTOM_BEGIN</option>
			<option value="bottomMiddle">BOTTOM_MIDDLE</option>
			<option value="bottomEnd">BOTTOM_END</option>

The following user(s) said Thank You: neo191987

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

Time to create page: 0.056 seconds
Powered by Kunena Forum