Questions tagged «enterprise-1.13»

2
加载/获取Magento路由之外的块以供外部使用
我有一个外部网页,我试图从Magento框架中提取站点标题块,以用作此外部页面中的标题。这是我到目前为止所拥有的: // initialize Magento $rootPath = dirname(dirname(__FILE__)); $mageInc = $rootPath . "/app/Mage.php"; include_once $mageInc; Mage::app('admin')->setCurrentStore(0); $headerBlock = Mage::app()->getLayout()->createBlock('page/html_header'); //also tried //$headerBlock = Mage::app()->getLayout()->createBlock('page/html_header', 'header'); 执行在那里停止,但是,我没有收到任何错误消息。我的目标是拉出block Mage_Page_Block_Html_Header,我认为我可以用来<block type="page/html_header" name="header" as="header">从page.xml布局文件中加载所有内容。该XML标签包装在里面 <default translate="label" module="page"> <block type="page/html" name="root" output="toHtml" template="page/1column.phtml"> 标签,所以也许我需要以某种方式指定它?我不确定自己在做什么错以及从这里去哪里。

2
CSRF攻击和会话劫持漏洞
从1.8CE Alpha发行说明: Magento Web商店具有附加的跨站点请求伪造(CSRF)保护,这意味着冒名顶替者不能再冒充新注册的客户并代表该客户执行操作。 和: 在早期版本中,Magento在注册过程中容易受到会话固定攻击的攻击。登录其帐户后,注册用户的会话ID不变。因此,如果攻击者知道了未经授权的会话ID,并且该用户成功注册,则攻击者可以接管新注册的帐户。现在,成功注册后,会话ID会更改,从而无法未经授权使用帐户。 如果这在发行说明中,并且我没有看到针对此版本的早期发行版(我在错误的位置?)–那么这意味着当前的1.8之前的版本可能会受到这些攻击向量? 来源:http://www.magentocommerce.com/knowledge-base/entry/ce-18-later-release-notes

2
可以截断report_viewed_product_index
我正在阅读可以截断的表的列表(/programming/12205714/list-of-tables-to-safely-truncate-in-magento),但没有看到 report_viewed_product_index 该表很大,还原数据库需要很长时间。截断此数据或至少删除最旧的数据是否安全?
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.