{"id":45,"date":"2019-05-21T00:46:00","date_gmt":"2019-07-21T00:46:00","guid":{"rendered":"http:\/\/pro369.com\/sale\/?p=45"},"modified":"2019-05-21T00:46:00","modified_gmt":"2019-07-21T00:46:00","slug":"%e8%a7%a3%e9%96%8b%ef%bc%9aregister-globals%e6%87%89%e8%a9%b2%e6%98%af%ef%bc%9aon%e6%88%96%e6%98%afoff%e7%9a%84%e7%96%91%e6%83%91","status":"publish","type":"post","link":"https:\/\/por.tw\/sale\/%e8%a7%a3%e9%96%8b%ef%bc%9aregister-globals%e6%87%89%e8%a9%b2%e6%98%af%ef%bc%9aon%e6%88%96%e6%98%afoff%e7%9a%84%e7%96%91%e6%83%91\/","title":{"rendered":"\u89e3\u958b\uff1aregister_globals\u61c9\u8a72\u662f\uff1aON\u6216\u662fOFF\u7684\u7591\u60d1"},"content":{"rendered":"<p><span style=\"font-size: small\"><span style=\"font-size: small\"><span style=\"font-size: small\">\u89e3\u958b\uff1aregister_globals\u61c9\u8a72\u662f\uff1aON\u6216\u662fOFF\u7684\u7591\u60d1<\/span><\/span><\/span><\/p>\n<p><span style=\"font-size: small\"><span style=\"font-size: small\"><span style=\"font-size: small; color: #ff00ff\">\u8cfc\u7269\u7db2\u7ad9\u67b6\u8a2d\u6642\uff1aOscommerce \u5b89\u88dd\u4e00\u958b\u59cb\uff0c\u82e5\u662f\u539f\u59cb\u78bc register_globals = Off\u662f\u7121\u6cd5\u5b89\u88dd\u7684\u3002<\/span><\/p>\n<p><\/span><\/span><span style=\"font-size: small; color: #ff0000\"><strong><span style=\"font-size: small\"><span style=\"font-size: small\">\u5982\u679c\u4f60\u662f\u79df\u7528\u865b\u64ec\u4e3b\u6a5f\uff08\u4e0d\u80fd\u81ea\u5df1\u4fee\u6539php.ini\u6642\uff09\u4e0d\u59a8\u8003\u616e\u5b89\u88dd\uff1aTwe-Commercs<br \/><span style=\"background-color: #ffff00; color: #000000\">\u56e0\u70baTwe-Commercs\u525b\u597d\u76f8\u53cd\uff01<span style=\"font-size: small; color: #ff00ff\">register_globals = Off\u662f\u53ef\u4ee5\u5b89\u88dd\u7684\uff01<\/span><\/span><\/span><\/span><\/strong><\/span><\/p>\n<p><span style=\"font-size: small; color: #ff0000\"><span style=\"font-size: small\"><span style=\"font-size: small\">\u8cfc\u7269\u7db2\u7ad9\u67b6\u8a2d\u6642\uff1aZenCart \u5b89\u88dd\u4e00\u958b\u59cb\uff0c\u82e5\u662f\u539f\u59cb\u78bc register_globals = On \u6703\u51fa\u73fe\u5b89\u5168\u554f\u865f\u3002<\/span><\/span><\/span><\/p>\n<p><span style=\"font-size: small; color: #0000ff\"><span style=\"font-size: small\"><span style=\"font-size: small\">\u5165\u53e3\u5167\u5bb9\u7ad9\u67b6\u8a2d\u6642\uff1aJoomla \u5b89\u88dd\u4e00\u958b\u59cb\uff0c\u82e5\u662f\u539f\u59cb\u78bc register_globals = On&nbsp; \u662f\u7121\u6cd5\u5b89\u88dd\u7684\u3002<\/span><\/span><\/span><\/p>\n<p><span style=\"font-size: small; color: #800000\"><span style=\"font-size: small\"><span style=\"font-size: small\">\u90a3 register_globals \u61c9\u8a72\u662f\uff1aON\u6216\u662fOFF\u624d\u597d\u5462\uff1f<\/span><\/span><\/span><\/p>\n<p><span style=\"font-size: small\"><span style=\"font-size: small\"><span style=\"font-size: small\">\u7528Google\u641c\u5c0b\u5230\u9019\u7bc7\u6587\u7ae0\uff0c\u6216\u8a31\u53ef\u4ee5\u89e3\u958b\u5927\u5bb6\u7684\u7591\u60d1\u3002<\/span><\/span><\/span><\/p>\n<p><span style=\"font-size: small\"><span style=\"font-size: small\"><span style=\"font-size: small\">2006-09-05 PHP\u591a\u9805\u672a\u6307\u660e\u7684\u6f0f\u6d1e ( \u8cc7\u6599\u4f86\u6e90\uff1aSecurityFocus )<br \/><\/span><\/span><span style=\"color: #ff00ff\"><span style=\"font-size: small\"><span style=\"font-size: small\">PHP \u5728zend_hash_del()\u7684\u529f\u80fd\u4e2d\u767c\u73fe\u4e00\u500b\u5f31\u9ede\u3002\u5c0d\u65bc\u4fe1\u4efb\u4f7f\u7528unset\u51fd\u6578\u7684PHP\u7a0b\u5f0f\uff0c\u653b\u64ca\u8005\u53ef\u4ee5\u7528\u66b4\u529b\u6cd5\u50b3\u905e\u4efb\u610f\u521d\u59cb\u5316\u7684\u51fd\u6578\u3002<br \/>\u9019\u500b\u6f0f\u6d1e\u5c0d\u65bc\u5c07\u53c3\u6578register_globals\u9810\u8a2d\u70ba\u300c\u958b\u555f(enable) \u300d\u7684\u7cfb\u7d71\u5f71\u97ff\u7279\u5225\u660e\u986f\uff0c\u5728Red Hat Enterprise Linux\u4e2dregister_globals\u9810\u8a2d\u6210\u300c\u95dc\u9589 (disable)<\/span><\/span><\/span><\/span><\/p>\n<p><span style=\"font-size: small; color: #ff0000\"><span style=\"font-size: small\"><span style=\"font-size: small\">\u56e0\u6b64\u8981\u628aregister_globals\u8a2d\u70baOn\uff0c\u53c8\u80fd\u5b89\u88dd\u6216\u662f\u4f7f\u7528Oscommerce\uff0c\u53ef\u4ee5\u4e0b\u8f09patch\u6a94\u5f8c\u8986\u84cb\u3002<\/span><\/span><\/span><\/p>\n<p><span style=\"font-size: small\"><span style=\"font-size: small\"><span style=\"font-size: small\">\u5b83\u7684 readme \u8aaa\u660e\u6a94\u5982\u4e0b:<\/span><\/span><\/span><\/p>\n<p><span style=\"font-size: small\"><span style=\"font-size: small\"><span style=\"font-size: small\">\u5f15\u7528:<br \/>CHANGES TO REMOVE register_globals REQUIREMENT &#8211; V 1.5 &#8211; Richard Bentley 01\/09\/2006<br \/>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<\/span><\/span><\/span><\/p>\n<p><span style=\"font-size: small\"><span style=\"font-size: small\"><span style=\"font-size: small\">Before proceding, read the README file !<\/span><\/span><\/span><\/p>\n<p><span style=\"font-size: small\"><span style=\"font-size: small\"><span style=\"font-size: small\">In this directory, you will find a set of files that have been pre-patched. The net result<br \/>is exactly the same as applying the patch instructions yourself.<\/span><\/span><\/span><\/p>\n<p><span style=\"font-size: small\"><span style=\"font-size: small\"><span style=\"font-size: small\">There are 13 files in total that have replacements. These are as follows :<\/span><\/span><\/span><\/p>\n<p><span style=\"font-size: small\"><span style=\"font-size: small\"><span style=\"font-size: small\">Admin&#8230;<br \/>&#8212;&#8212;&#8212;<br \/>&#8230;\/admin\/products_attributes.php<br \/>&#8230;\/admin\/includes\/application_top.php<br \/>&#8230;\/admin\/includes\/functions\/general.php<br \/>&#8230;\/admin\/includes\/functions\/sessions.php<\/span><\/span><\/span><\/p>\n<p><span style=\"font-size: small\"><span style=\"font-size: small\"><span style=\"font-size: small\">On a default installation of OSC, the &#39;admin&#39; directory is actually contained within the<br \/>&#39;catalog&#39; directory (ie &#8230;\/catalog\/admin\/), but I have split it out here to make the<br \/>division clearer (as an aside, you will find that if you move admin\/ out of catalog\/,<br \/>it makes the admin section somewhat more straightforward to secure, but this is outside<br \/>the scope of this patch)<\/span><\/span><\/span><\/p>\n<p><span style=\"font-size: small\"><span style=\"font-size: small\"><span style=\"font-size: small\">Catalogue&#8230;<br \/>&#8212;&#8212;&#8212;&#8212;<br \/>&#8230;\/catalog\/install\/includes\/application.php<\/span><\/span><\/span><\/p>\n<p><span style=\"font-size: small\"><span style=\"font-size: small\"><span style=\"font-size: small\">NOTE: If you have already installed OSC (ie &#8211; run through the installation procedure),<br \/>&#8212;- then the above file may not exist (in which case you should not add it back in<br \/>with the replacement file); once installation of OSC is complete, you should<br \/>delete the whole of the &#8230;\/catalog\/install\/ directory &#8211; it is not needed after<br \/>installation and having it hanging around is a security risk<\/span><\/span><\/span><\/p>\n<p><span style=\"font-size: small\"><span style=\"font-size: small\"><span style=\"font-size: small\">&#8230;\/catalog\/includes\/application_top.php<br \/>&#8230;\/catalog\/include\/classes\/order.php<br \/>&#8230;\/catalog\/includes\/functions\/general.php<br \/>&#8230;\/catalog\/includes\/functions\/gzip_compression.php<br \/>&#8230;\/catalog\/includes\/functions\/sessions.php<br \/>&#8230;\/catalog\/includes\/languages\/english\/password_forgotten.php<br \/>&#8230;\/catalog\/includes\/languages\/espanol\/password_forgotten.php<br \/>&#8230;\/catalog\/includes\/languages\/german\/password_forgotten.php<\/span><\/span><\/span><\/p>\n<p><span style=\"font-size: small\"><span style=\"font-size: small\"><span style=\"font-size: small\">NOTE: I have NOT included a pre-patched version of the easypopulate file. This is because<br \/>&#8212;- it will probably be out of date by the time you read this. Instead, if you need to<br \/>patch easypopulate (if it STILL needs patching, and by now it really should have been<br \/>reworked so that it doesn&#39;t need patching) then refer to the manual patching<br \/>instructions (the very last entry in the admin_patch text file will tell you what<br \/>you need to do &#8211; it&#39;s very simple&#8230; honest)<\/span><\/span><\/span><\/p>\n<p><span style=\"font-size: small\"><span style=\"font-size: small\"><span style=\"font-size: small\">=======================================================<br \/>&gt;&gt;&gt; WARNING &lt;&lt;&lt;<\/span><\/span><\/span><\/p>\n<p><span style=\"font-size: small\"><span style=\"font-size: small\"><span style=\"font-size: small\">These files are based on the MS 2.2 release, dated 17\/09\/2006 (ie &#8211; the<br \/>security\/bugfix update #2 to the original MS 2.2). If you are using some other version<br \/>of OSC then I strongly suggest you apply this patch manually and NOT use these pre-patched<br \/>files. The exception to this is the security\/bugfix release 13\/11\/2005; it is ok<br \/>to patch this version directly with these files; see the README file for more details<\/span><\/span><\/span><\/p>\n<p><span style=\"font-size: small\"><span style=\"font-size: small\"><span style=\"font-size: small\">=======================================================<br \/>&gt;&gt;&gt; WARNING &lt;&lt;&lt;<\/span><\/span><\/span><\/p>\n<p><span style=\"font-size: small\"><span style=\"font-size: small\"><span style=\"font-size: small\">If you have already applied some other changes (contributions\/patches) to your OSC code<br \/>then make sure you are not blatting over those changes by copying these files over. If in<br \/>doubt then I strongly suggest you use the manual instructions in the &#39;patch_instructions&#39;<br \/>directory and apply the patch line by line; despite what many people say, it really<br \/>doesn&#39;t take very long &#8211; it took me about 20 minutes!<\/span><\/span><\/span><\/p>\n<p><span style=\"font-size: small\"><span style=\"font-size: small\"><span\nst\nyle=\"font-size: small\">=======================================================<br \/>INSTALLATION<br \/>&#8212;&#8212;&#8212;&#8212;<\/span><\/span><\/span><\/p>\n<p><span style=\"font-size: small\"><span style=\"font-size: small\"><span style=\"font-size: small\">1\/ Copy the above files to their appropriate places in your existing OSC code tree<\/span><\/span><\/span><\/p>\n<p><span style=\"font-size: small\"><span style=\"font-size: small\"><span style=\"font-size: small\">2\/ Make sure you set the permissions of the replacement files appropriately for the<br \/>environment you are using. If you fancy getting the shit hacked out of you then<br \/>feel free to set permissions of &#39;777&#39;. If you fancy something a tad more secure<br \/>then I suggest engaging brain and thinking about it \ud83d\ude42<br \/>If you don&#39;t KNOW how to set some sensible file pemissions then find yourself<br \/>a good text book and learn how to use your computer<\/span><\/span><\/span><\/p>\n<p><span style=\"font-size: small\"><span style=\"font-size: small\"><span style=\"font-size: small\">3\/ It&#39;s been mentioned in the README file already, but once you have made this<br \/>change, you MUST disable the register_globals option in php.ini<\/span><\/span><\/span><\/p>\n<p><span style=\"font-size: small\"><span style=\"font-size: small\"><span style=\"font-size: small\">ie, in php.ini :<\/span><\/span><\/span><\/p>\n<p><span style=\"font-size: small\"><span style=\"font-size: small\"><span style=\"font-size: small\">register_globals = Off<\/span><\/span><\/span><\/p>\n<p><span style=\"font-size: small\"><span style=\"font-size: small\"><span style=\"font-size: small\">=======================================================<\/span><\/span><\/span><\/p>\n<p><span style=\"font-size: small\"><span style=\"font-size: small\"><span style=\"font-size: small\"><span style=\"font-size: x-small; color: #ff0000\">\u53c3\u8003\u4e0b\u8f09\u7db2\u9801\uff1a<\/span> <\/span><\/span><\/span><a href=\"http:\/\/www.oscommerce.com\/community\/contributions,2097\/category,all\/search,register_globals\" target=\"_blank\" rel=\"noopener\"><span style=\"font-size: x-small\"><span style=\"font-size: small\"><span style=\"font-size: small\">http:\/\/www.oscommerce.com\/community\/contributions,2097\/category,all\/search,register_globals<\/span><\/span><\/span><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u89e3\u958b\uff1aregister_globals\u61c9\u8a72\u662f\uff1aON\u6216\u662fOFF\u7684\u7591\u60d1 \u8cfc\u7269\u7db2\u7ad9\u67b6\u8a2d\u6642\uff1aOscommerce \u5b89\u88dd [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":625,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[22],"tags":[],"_links":{"self":[{"href":"https:\/\/por.tw\/sale\/wp-json\/wp\/v2\/posts\/45"}],"collection":[{"href":"https:\/\/por.tw\/sale\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/por.tw\/sale\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/por.tw\/sale\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/por.tw\/sale\/wp-json\/wp\/v2\/comments?post=45"}],"version-history":[{"count":0,"href":"https:\/\/por.tw\/sale\/wp-json\/wp\/v2\/posts\/45\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/por.tw\/sale\/wp-json\/wp\/v2\/media\/625"}],"wp:attachment":[{"href":"https:\/\/por.tw\/sale\/wp-json\/wp\/v2\/media?parent=45"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/por.tw\/sale\/wp-json\/wp\/v2\/categories?post=45"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/por.tw\/sale\/wp-json\/wp\/v2\/tags?post=45"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}