Skip to content

Commit c6cc72a

Browse files
author
Natalia Momotenko
committed
Merge remote-tracking branch 'origin/develop' into MAGETWO-42364
2 parents a6d1a0b + 86d5abe commit c6cc72a

File tree

4,876 files changed

+96936
-68140
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

4,876 files changed

+96936
-68140
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,3 +47,4 @@ atlassian*
4747
/var/*
4848
!/var/.htaccess
4949
/vendor
50+
!/vendor/.htaccess

.htaccess

Lines changed: 82 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -171,14 +171,91 @@
171171
</IfModule>
172172

173173
###########################################
174-
## Deny access to release notes to prevent disclosure of the installed Magento version
174+
## Deny access to root files to hide sensitive application information
175+
RedirectMatch 404 /\.git
175176

176-
<Files RELEASE_NOTES.txt>
177-
Order allow,deny
178-
Deny from all
177+
<Files composer.json>
178+
order allow,deny
179+
deny from all
179180
</Files>
180-
############################################
181+
<Files composer.lock>
182+
order allow,deny
183+
deny from all
184+
</Files>
185+
<Files .gitignore>
186+
order allow,deny
187+
deny from all
188+
</Files>
189+
<Files .htaccess>
190+
order allow,deny
191+
deny from all
192+
</Files>
193+
<Files .htaccess.sample>
194+
order allow,deny
195+
deny from all
196+
</Files>
197+
<Files .php_cs>
198+
order allow,deny
199+
deny from all
200+
</Files>
201+
<Files .travis.yml>
202+
order allow,deny
203+
deny from all
204+
</Files>
205+
<Files CHANGELOG.md>
206+
order allow,deny
207+
deny from all
208+
</Files>
209+
<Files CONTRIBUTING.md>
210+
order allow,deny
211+
deny from all
212+
</Files>
213+
<Files CONTRIBUTOR_LICENSE_AGREEMENT.html>
214+
order allow,deny
215+
deny from all
216+
</Files>
217+
<Files COPYING.txt>
218+
order allow,deny
219+
deny from all
220+
</Files>
221+
<Files Gruntfile.js>
222+
order allow,deny
223+
deny from all
224+
</Files>
225+
<Files LICENSE.txt>
226+
order allow,deny
227+
deny from all
228+
</Files>
229+
<Files LICENSE_AFL.txt>
230+
order allow,deny
231+
deny from all
232+
</Files>
233+
<Files nginx.conf.sample>
234+
order allow,deny
235+
deny from all
236+
</Files>
237+
<Files package.json>
238+
order allow,deny
239+
deny from all
240+
</Files>
241+
<Files php.ini.sample>
242+
order allow,deny
243+
deny from all
244+
</Files>
245+
<Files README.md>
246+
order allow,deny
247+
deny from all
248+
</Files>
249+
250+
################################
181251
## If running in cluster environment, uncomment this
182252
## http://developer.yahoo.com/performance/rules.html#etags
183253

184254
#FileETag none
255+
256+
############################################
257+
## Add custom headers
258+
<IfModule mod_headers.c>
259+
Header set X-Content-Type-Options "nosniff"
260+
Header set X-XSS-Protection "1; mode=block"
261+
</IfModule>

.htaccess.sample

Lines changed: 79 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
############################################
3737
## adjust memory limit
3838

39-
php_value memory_limit 256M
39+
php_value memory_limit 768M
4040
php_value max_execution_time 18000
4141

4242
############################################
@@ -65,13 +65,6 @@
6565
SecFilterScanPOST Off
6666
</IfModule>
6767

68-
<IfModule mod_headers.c>
69-
############################################
70-
## prevent clickjacking
71-
72-
Header set X-Frame-Options SAMEORIGIN
73-
</IfModule>
74-
7568
<IfModule mod_deflate.c>
7669

7770
############################################
@@ -136,9 +129,11 @@
136129
RewriteRule .* - [L,R=405]
137130

138131
############################################
139-
## always send 404 on missing files in these folders
132+
## redirect for mobile user agents
140133

141-
RewriteCond %{REQUEST_URI} !^/pub/(media|js)/
134+
#RewriteCond %{REQUEST_URI} !^/mobiledirectoryhere/.*$
135+
#RewriteCond %{HTTP_USER_AGENT} "android|blackberry|ipad|iphone|ipod|iemobile|opera mobile|palmos|webos|googlebot-mobile" [NC]
136+
#RewriteRule ^(.*)$ /mobiledirectoryhere/ [L,R=302]
142137

143138
############################################
144139
## never rewrite for existing files, directories and links
@@ -175,16 +170,84 @@
175170
</IfModule>
176171

177172
###########################################
178-
## Deny access to release notes to prevent disclosure of the installed Magento version
173+
## Deny access to root files to hide sensitive application information
174+
RedirectMatch 404 /\.git
179175

180-
<Files RELEASE_NOTES.txt>
181-
Order allow,deny
182-
Deny from all
176+
<Files composer.json>
177+
order allow,deny
178+
deny from all
179+
</Files>
180+
<Files composer.lock>
181+
order allow,deny
182+
deny from all
183+
</Files>
184+
<Files .gitignore>
185+
order allow,deny
186+
deny from all
187+
</Files>
188+
<Files .htaccess>
189+
order allow,deny
190+
deny from all
191+
</Files>
192+
<Files .htaccess.sample>
193+
order allow,deny
194+
deny from all
195+
</Files>
196+
<Files .php_cs>
197+
order allow,deny
198+
deny from all
199+
</Files>
200+
<Files .travis.yml>
201+
order allow,deny
202+
deny from all
203+
</Files>
204+
<Files CHANGELOG.md>
205+
order allow,deny
206+
deny from all
207+
</Files>
208+
<Files CONTRIBUTING.md>
209+
order allow,deny
210+
deny from all
211+
</Files>
212+
<Files CONTRIBUTOR_LICENSE_AGREEMENT.html>
213+
order allow,deny
214+
deny from all
215+
</Files>
216+
<Files COPYING.txt>
217+
order allow,deny
218+
deny from all
219+
</Files>
220+
<Files Gruntfile.js>
221+
order allow,deny
222+
deny from all
223+
</Files>
224+
<Files LICENSE.txt>
225+
order allow,deny
226+
deny from all
227+
</Files>
228+
<Files LICENSE_AFL.txt>
229+
order allow,deny
230+
deny from all
231+
</Files>
232+
<Files nginx.conf.sample>
233+
order allow,deny
234+
deny from all
235+
</Files>
236+
<Files package.json>
237+
order allow,deny
238+
deny from all
239+
</Files>
240+
<Files php.ini.sample>
241+
order allow,deny
242+
deny from all
243+
</Files>
244+
<Files README.md>
245+
order allow,deny
246+
deny from all
183247
</Files>
184248

185-
############################################
249+
################################
186250
## If running in cluster environment, uncomment this
187251
## http://developer.yahoo.com/performance/rules.html#etags
188252

189253
#FileETag none
190-

app/code/Magento/AdminNotification/Model/Observer.php

Lines changed: 0 additions & 52 deletions
This file was deleted.
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
<?php
2+
/**
3+
* Copyright © 2015 Magento. All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
6+
namespace Magento\AdminNotification\Observer;
7+
8+
use Magento\Framework\Event\ObserverInterface;
9+
10+
/**
11+
* AdminNotification observer
12+
*
13+
* @author Magento Core Team <core@magentocommerce.com>
14+
*/
15+
class PredispathAdminActionControllerObserver implements ObserverInterface
16+
{
17+
/**
18+
* @var \Magento\AdminNotification\Model\FeedFactory
19+
*/
20+
protected $_feedFactory;
21+
22+
/**
23+
* @var \Magento\Backend\Model\Auth\Session
24+
*/
25+
protected $_backendAuthSession;
26+
27+
/**
28+
* @param \Magento\AdminNotification\Model\FeedFactory $feedFactory
29+
* @param \Magento\Backend\Model\Auth\Session $backendAuthSession
30+
*/
31+
public function __construct(
32+
\Magento\AdminNotification\Model\FeedFactory $feedFactory,
33+
\Magento\Backend\Model\Auth\Session $backendAuthSession
34+
) {
35+
$this->_feedFactory = $feedFactory;
36+
$this->_backendAuthSession = $backendAuthSession;
37+
}
38+
39+
/**
40+
* Predispath admin action controller
41+
*
42+
* @param \Magento\Framework\Event\Observer $observer
43+
* @return void
44+
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
45+
*/
46+
public function execute(\Magento\Framework\Event\Observer $observer)
47+
{
48+
if ($this->_backendAuthSession->isLoggedIn()) {
49+
$feedModel = $this->_feedFactory->create();
50+
/* @var $feedModel \Magento\AdminNotification\Model\Feed */
51+
$feedModel->checkUpdate();
52+
}
53+
}
54+
}

app/code/Magento/AdminNotification/composer.json

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,21 +7,18 @@
77
"magento/module-backend": "1.0.0-beta",
88
"magento/module-media-storage": "1.0.0-beta",
99
"magento/framework": "1.0.0-beta",
10-
"lib-libxml": "*",
11-
"magento/magento-composer-installer": "*"
10+
"lib-libxml": "*"
1211
},
1312
"type": "magento2-module",
1413
"version": "1.0.0-beta",
1514
"license": [
1615
"OSL-3.0",
1716
"AFL-3.0"
1817
],
19-
"extra": {
20-
"map": [
21-
[
22-
"*",
23-
"Magento/AdminNotification"
24-
]
25-
]
18+
"autoload": {
19+
"files": [ "registration.php" ],
20+
"psr-4": {
21+
"Magento\\AdminNotification\\": ""
22+
}
2623
}
2724
}

app/code/Magento/AdminNotification/etc/acl.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* See COPYING.txt for license details.
66
*/
77
-->
8-
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Acl/etc/acl.xsd">
8+
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Acl/etc/acl.xsd">
99
<acl>
1010
<resources>
1111
<resource id="Magento_Backend::admin">

app/code/Magento/AdminNotification/etc/adminhtml/di.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* See COPYING.txt for license details.
66
*/
77
-->
8-
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd">
8+
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
99
<type name="Magento\Framework\Notification\MessageList">
1010
<arguments>
1111
<argument name="messages" xsi:type="array">

app/code/Magento/AdminNotification/etc/adminhtml/events.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
* See COPYING.txt for license details.
66
*/
77
-->
8-
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/Event/etc/events.xsd">
8+
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Event/etc/events.xsd">
99
<event name="controller_action_predispatch">
10-
<observer name="adminnotification" instance="Magento\AdminNotification\Model\Observer" method="preDispatch" />
10+
<observer name="adminnotification" instance="Magento\AdminNotification\Observer\PredispathAdminActionControllerObserver" method="execute" />
1111
</event>
1212
</config>

0 commit comments

Comments
 (0)