Skip to content

Commit 63b3147

Browse files
author
gau1991
committed
Fixes WordPress XSS Vulnerability found in themes and plugins of example.html
1 parent febd2a3 commit 63b3147

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

ee/cli/templates/locations.mustache

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ location ~* ^.+\.(bak|log|old|orig|original|php#|php~|php_bak|save|swo|swp|sql)$
3333
access_log off;
3434
log_not_found off;
3535
}
36-
# Return 403 forbidden for readme.(txt|html) or license.(txt|html)
37-
if ($request_uri ~* "^.+(readme|license)\.(txt|html)$") {
36+
# Return 403 forbidden for readme.(txt|html) or license.(txt|html) or example.(txt|html)
37+
if ($request_uri ~* "^.+(readme|license|example)\.(txt|html)$") {
3838
return 403;
3939
}
4040
# Status pages

install

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -305,6 +305,14 @@ function ee_update_latest()
305305
if [ $? -eq 0 ]; then
306306
update-rc.d hhvm defaults &>> /dev/null
307307
fi
308+
309+
# Fix WordPress example.html issue
310+
# Ref: http://wptavern.com/xss-vulnerability-in-jetpack-and-the-twenty-fifteen-default-theme-affects-millions-of-wordpress-users
311+
dpkg --get-selections | grep -v deinstall | grep nginx &>> /dev/null
312+
if [ $? -eq 0 ]; then
313+
cp /usr/lib/ee/templates/locations.mustache /etc/nginx/common/locations.conf &>> /dev/null
314+
fi
315+
308316
}
309317

310318
# Do git intialisation

0 commit comments

Comments
 (0)