Skip to content

Commit 4dd2361

Browse files
committed
Merge branch 'dev'
2 parents 4637870 + 7e30f63 commit 4dd2361

File tree

30 files changed

+618
-61
lines changed

30 files changed

+618
-61
lines changed

.htaccess

+41-12
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,63 @@
11
#
2-
# Monstra :: php & apache settings
2+
# This file is part of the Monstra.
3+
#
4+
# (c) Romanenko Sergey / Awilum <awilum@msn.com>
5+
#
6+
# For the full copyright and license information, please view the LICENSE
7+
# file that was distributed with this source code.
38
#
49

510
# Set default charset utf-8
611
AddDefaultCharset UTF-8
712

8-
# Don't show directory listings for URLs which map to a directory.
9-
Options -Indexes
10-
1113
# PHP 5, Apache 1 and 2.
1214
<IfModule mod_php5.c>
1315
php_flag magic_quotes_gpc off
1416
php_flag magic_quotes_sybase off
1517
php_flag register_globals off
1618
</IfModule>
1719

18-
19-
# Setting rewrite rules.
2020
<IfModule mod_rewrite.c>
2121
RewriteEngine on
2222

23-
# Update code bellow for SEO improvements
24-
# RewriteCond %{HTTP_HOST} ^www.example.org [NC]
25-
# RewriteRule ^(.*)$ http://example.org/$1 [R=301,L]
26-
23+
## Begin - Rewrite rules to block out some common exploits.
24+
# If you experience problems on your site block out the operations listed below
25+
# This attempts to block the most common type of exploit `attempts` to Monstra
26+
#
27+
# Block out any script trying to base64_encode data within the URL.
28+
RewriteCond %{QUERY_STRING} base64_encode[^(]*\([^)]*\) [OR]
29+
# Block out any script that includes a <script> tag in URL.
30+
RewriteCond %{QUERY_STRING} (<|%3C)([^s]*s)+cript.*(>|%3E) [NC,OR]
31+
# Block out any script trying to set a PHP GLOBALS variable via URL.
32+
RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]
33+
# Block out any script trying to modify a _REQUEST variable via URL.
34+
RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2})
35+
# Return 403 Forbidden header and show the content of the root homepage
36+
RewriteRule .* index.php [F]
37+
#
38+
## End - Rewrite rules to block out some common exploits.
39+
40+
## Begin - Rewrite rules for Monstra
2741
RewriteBase /%siteurlhere%/
2842
RewriteCond %{REQUEST_FILENAME} !-f
2943
RewriteCond %{REQUEST_FILENAME} !-d
3044
RewriteRule ^(.*)$ index.php [QSA,L]
45+
## End - Rewrite rules for Monstra
46+
47+
## Begin - Rewrite rules for SEO improvements.
48+
# RewriteCond %{HTTP_HOST} ^www.example.org [NC]
49+
# RewriteRule ^(.*)$ http://example.org/$1 [R=301,L]
50+
# Redirect 301 /index http://example.org/
51+
## End - Rewrite rules for SEO improvements.
3152

32-
# Update code bellow for SEO improvements
33-
# Redirect 301 /home http://example.org/
3453
</IfModule>
54+
55+
# Prevent visitors from viewing files directly.
56+
<FilesMatch "(^#.*#|\.(md|txt|html|tpl|yml|yaml)|~)$">
57+
Order allow,deny
58+
Deny from all
59+
Satisfy All
60+
</FilesMatch>
61+
62+
# Don't show directory listings for URLs which map to a directory.
63+
Options -Indexes

CHANGELOG.md

+9-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
Monstra 3.0.3, 2016-01-29
2+
------------------------
3+
- Improved Monstra Security
4+
- Minimum PHP version for Monstra is 5.3.2
5+
- Admin: Fixed 404 error when using certain server configurations
6+
- Localization: Major Fixes for SR, KA-GE, and ES
7+
- Install Script Fixes
8+
19
Monstra 3.0.2, 2015-10-16
210
------------------------
311
- Added Monstra MIT LICENSE instead of GNU GENERAL PUBLIC LICENSE v3
@@ -141,7 +149,7 @@ Monstra 2.1.3, 2012-12-09
141149
- Pages Plugin: add ability to get content for specific page.
142150
- XMLDB: New method factory() added.
143151
- Twitter Bootstrap updated to Version 2.2.2
144-
- Sitemap Plugin: _blank removed.
152+
- Sitemap Plugin: `_blank` removed.
145153
- Filesmanager Plugin: fixes.
146154
- Backup Plugin: fixes.
147155

LICENSE.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright (c) 2012 - 2015 Monstra Content Management
3+
Copyright (c) 2012 - 2016 Monstra Content Management
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Monstra is a modern and lightweight Content Management System.
55

66
## System Requirements
77
Operation system: Unix, Linux, Windows, Mac OS
8-
Middleware: PHP 5.3.0 or higher with PHP's [SimpleXML module](http://php.net/simplexml) and [Multibyte String module](http://php.net/mbstring)
8+
Middleware: PHP 5.3.2 or higher with PHP's [SimpleXML module](http://php.net/simplexml) and [Multibyte String module](http://php.net/mbstring)
99
Webserver: Apache with [Mod Rewrite](http://httpd.apache.org/docs/current/mod/mod_rewrite.html) or Ngnix with [Rewrite Module](http://wiki.nginx.org/HttpRewriteModule)
1010

1111
## Steps to Install

admin/index.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@
156156
if (Request::get('id')) {
157157
$area = Request::get('id');
158158
} else {
159-
Request::redirect('index.php?id=dashboard');
159+
Request::redirect(Site::url().'/admin/index.php?id=dashboard');
160160
}
161161

162162
$plugins_registered = Plugin::$plugins;

admin/themes/default/css/default.css

+5-1
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@
1414
@font-face {
1515
font-family: 'Glyphicons Halflings';
1616

17+
src: url('@site_url/public/assets/fonts/glyphicons-halflings-regular.eot');
1718
src: url('@site_url/public/assets/fonts/glyphicons-halflings-regular.eot?#iefix') format('embedded-opentype'),
1819
url('@site_url/public/assets/fonts/glyphicons-halflings-regular.woff') format('woff'),
1920
url('@site_url/public/assets/fonts/glyphicons-halflings-regular.ttf') format('truetype'),
2021
url('@site_url/public/assets/fonts/glyphicons-halflings-regular.svg#glyphicons-halflingsregular') format('svg');
21-
src: url('@site_url/public/assets/fonts/glyphicons-halflings-regular.eot');
2222
}
2323

2424
body {
@@ -88,6 +88,10 @@ footer span {
8888
border-top: 1px solid #e0e0e0;
8989
}
9090

91+
footer .highlight {
92+
color: #333;
93+
}
94+
9195
/*************************************
9296
2. COMPONENTS
9397
*************************************/

admin/themes/default/index.template.php

+21-27
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
<html lang="en">
33
<head>
44
<meta charset="utf-8">
5-
5+
66
<meta http-equiv="x-dns-prefetch-control" content="on">
77
<link rel="dns-prefetch" href="<?php echo Site::url(); ?>" />
88
<link rel="dns-prefetch" href="//www.google-analytics.com" />
99
<link rel="dns-prefetch" href="//www.gravatar.com" />
10-
10+
1111
<title>Monstra :: <?php echo __('Administration', 'system'); ?></title>
1212
<meta name="viewport" content="width=device-width, initial-scale=1.0">
1313
<meta name="description" content="Monstra Admin Area" />
@@ -27,8 +27,8 @@
2727
<!-- JavaScripts -->
2828
<script src="<?php echo Site::url(); ?>/public/assets/js/jquery.min.js"></script>
2929
<script src="<?php echo Site::url(); ?>/public/assets/js/bootstrap.min.js"></script>
30-
<script src="<?php echo Site::url(); ?>/public/assets/js/messenger.min.js"></script>
31-
<script src="<?php echo Site::url(); ?>/public/assets/js/icheck.min.js"></script>
30+
<script src="<?php echo Site::url(); ?>/public/assets/js/messenger.min.js"></script>
31+
<script src="<?php echo Site::url(); ?>/public/assets/js/icheck.min.js"></script>
3232
<?php Javascript::add('public/assets/js/jquery.chocolat.js', 'backend', 3); ?>
3333
<?php Javascript::add('public/assets/js/bootstrap-fileupload.js', 'backend', 4); ?>
3434
<?php Javascript::add('admin/themes/default/js/default.js', 'backend', 5); ?>
@@ -41,9 +41,9 @@
4141

4242
$('.chocolat').Chocolat({
4343
overlayColor : '#000',
44-
leftImg : "<?php echo Option::get('siteurl'); ?>/public/assets/img/chocolat/left.gif",
45-
rightImg : "<?php echo Option::get('siteurl'); ?>/public/assets/img/chocolat/right.gif",
46-
closeImg : "<?php echo Option::get('siteurl'); ?>/public/assets/img/chocolat/close.gif",
44+
leftImg : "<?php echo Option::get('siteurl'); ?>/public/assets/img/chocolat/left.gif",
45+
rightImg : "<?php echo Option::get('siteurl'); ?>/public/assets/img/chocolat/right.gif",
46+
closeImg : "<?php echo Option::get('siteurl'); ?>/public/assets/img/chocolat/close.gif",
4747
loadingImg : "<?php echo Option::get('siteurl'); ?>/public/assets/img/chocolat/loading.gif"
4848
});
4949

@@ -53,7 +53,7 @@
5353
increaseArea: '20%'
5454
});
5555

56-
});
56+
});
5757
</script>
5858

5959
<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
@@ -65,7 +65,7 @@
6565

6666
<body class="page-<?php echo Request::get('id'); ?>">
6767

68-
<nav class="navbar navbar-default navbar-inverse" role="navigation">
68+
<nav class="navbar navbar-default navbar-inverse" role="navigation">
6969
<div class="container">
7070
<div class="navbar-header">
7171
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
@@ -77,57 +77,57 @@
7777
<a class="navbar-brand" href="<?php echo Site::url(); ?>/admin/index.php?id=dashboard">MONSTRA</a>
7878
</div>
7979

80-
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
81-
<ul class="nav navbar-nav">
82-
<li<?php if (Request::get('id') == 'dashboard') { ?> class="active"<?php } ?>><a href="<?php echo Site::url(); ?>/admin/index.php?id=dashboard"><?php echo __('Dashboard', 'dashboard'); ?></a></li>
80+
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
81+
<ul class="nav navbar-nav">
82+
<li<?php if (Request::get('id') == 'dashboard') { ?> class="active"<?php } ?>><a href="<?php echo Site::url(); ?>/admin/index.php?id=dashboard"><?php echo __('Dashboard', 'dashboard'); ?></a></li>
8383
<li class="dropdown">
8484
<a href="#" class="dropdown-toggle" data-toggle="dropdown"><?php echo __('Content', 'pages'); ?> <b class="caret"></b></a>
8585
<ul class="dropdown-menu">
8686
<?php Navigation::draw('content'); ?>
8787
</ul>
8888
</li>
89-
<?php if (Session::exists('user_role') && in_array(Session::get('user_role'), array('admin'))) { ?>
89+
<?php if (Session::exists('user_role') && in_array(Session::get('user_role'), array('admin'))) { ?>
9090
<li class="dropdown">
9191
<a href="#" class="dropdown-toggle" data-toggle="dropdown"><?php echo __('Extends', 'system'); ?> <b class="caret"></b></a>
9292
<ul class="dropdown-menu">
93-
<?php Navigation::draw('extends'); ?>
93+
<?php Navigation::draw('extends'); ?>
9494
</ul>
9595
</li>
9696
<?php } ?>
9797
<li class="dropdown">
9898
<a href="#" class="dropdown-toggle" data-toggle="dropdown"><?php echo __('System', 'system'); ?> <b class="caret"></b></a>
9999
<ul class="dropdown-menu">
100-
<?php Navigation::draw('system'); ?>
100+
<?php Navigation::draw('system'); ?>
101101
</ul>
102102
</li>
103103
<li class="dropdown">
104104
<a href="#" class="dropdown-toggle" data-toggle="dropdown"><?php echo __('Help', 'system'); ?> <b class="caret"></b></a>
105105
<ul class="dropdown-menu">
106-
<li><a href="http://monstra.org/documentation" target="_blank"><?php echo __('Documentation', 'system'); ?></a></li>
106+
<li><a href="http://monstra.org/documentation" target="_blank"><?php echo __('Documentation', 'system'); ?></a></li>
107107
<?php if (Option::get('language') == 'ru') { ?>
108108
<li><a href="http://ru.forum.monstra.org" target="_blank"><?php echo __('Official Support Forum', 'system'); ?></a></li>
109109
<?php } else { ?>
110110
<li><a href="http://forum.monstra.org" target="_blank"><?php echo __('Official Support Forum', 'system'); ?></a></li>
111111
<?php } ?>
112112
</ul>
113113
</li>
114-
</ul>
114+
</ul>
115115
<ul class="nav navbar-nav navbar-right">
116116
<li><a href="<?php echo Site::url(); ?>" target="_blank"><?php echo __('View Site', 'system'); ?></a></li>
117117
<li class="dropdown">
118118
<a href="#" class="dropdown-toggle" data-toggle="dropdown"><?php echo Session::get('user_login'); ?> <img src="<?php echo Users::getGravatarURL(Session::get('user_email'), 28); ?>" alt=""> <b class="caret"></b></a>
119119
<ul class="dropdown-menu">
120120
<li><a href="<?php echo Site::url(); ?>/admin/index.php?id=users&action=edit&user_id=<?php echo Session::get('user_id'); ?>"><?php echo __('Profile', 'users')?></a></li>
121-
<li><a href="<?php echo Site::url(); ?>/admin/?logout=do"><?php echo __('Log Out', 'users'); ?></a></li>
121+
<li><a href="<?php echo Site::url(); ?>/admin/?logout=do"><?php echo __('Log Out', 'users'); ?></a></li>
122122
</ul>
123123
</li>
124-
</ul>
124+
</ul>
125125
</div>
126126
</div>
127127
</nav>
128128

129129
<div class="container">
130-
130+
131131
<?php
132132
// Monstra Notifications
133133
Notification::get('success') AND Alert::success(Notification::get('success'));
@@ -156,13 +156,7 @@
156156
<footer class="container visible-md visible-lg">
157157
<p class="pull-right">
158158
<span>
159-
<?php if (Option::get('language') == 'ru') { ?>
160-
<a href="http://ru.forum.monstra.org" target="_blank"><?php echo __('Official Support Forum', 'system'); ?></a> /
161-
<?php } else { ?>
162-
<a href="http://forum.monstra.org" target="_blank"><?php echo __('Official Support Forum', 'system'); ?></a> /
163-
<?php } ?>
164-
<a href="http://monstra.org/documentation" target="_blank"><?php echo __('Documentation', 'system'); ?></a> /
165-
© 2012 - 2014 <a href="http://monstra.org" target="_blank">Monstra</a> – <?php echo __('Version', 'system'); ?> <?php echo Monstra::VERSION; ?>
159+
<a href="http://monstra.org" target="_blank">Monstra</a> was made by <a href="http://awilum.github.io" target="_blank" class="highlight">Sergey Romanenko</a> and is maintained by <a href="https://github.com/monstra-cms/monstra/network/members" target="_blank" class="highlight">Monstra Community</a> / © 2012 - 2016 <a href="http://monstra.org/about/license" target="_blank">Monstra</a> – <?php echo __('Version', 'system'); ?> <?php echo Monstra::VERSION; ?>
166160
</span>
167161
</p>
168162
</footer>

admin/themes/default/login.template.php

+3-6
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
2222
<script src="<?php echo Site::url(); ?>/public/assets/js/bootstrap.min.js"></script>
2323
<script src="<?php echo Site::url(); ?>/public/assets/js/messenger.min.js"></script>
24-
<script src="<?php echo Site::url(); ?>/public/assets/js/messenger-theme-flat.js"></script>
24+
<script src="<?php echo Site::url(); ?>/public/assets/js/messenger-theme-flat.js"></script>
2525
<?php Javascript::add('public/assets/js/bootstrap-lightbox.js', 'backend', 3); ?>
2626
<?php Javascript::add('public/assets/js/bootstrap-fileupload.js', 'backend', 4); ?>
2727
<?php Javascript::add('admin/themes/default/js/default.js', 'backend', 5); ?>
@@ -92,7 +92,7 @@
9292
<form method="post">
9393
<div class="form-group">
9494
<label><?php echo __('Username', 'users'); ?></label>
95-
<input name="login" class="form-control" type="text" value="<?php echo $user_login; ?>" />
95+
<input name="login" class="form-control" type="text" value="<?php echo $user_login; ?>" />
9696
</div>
9797
<?php if (Option::get('captcha_installed') == 'true') { ?>
9898
<div class="form-group">
@@ -128,11 +128,8 @@
128128
</div>
129129

130130
<div class="text-center">
131-
<span>© 2012 - 2014 <a href="http://monstra.org" class="small-grey-text" target="_blank">Monstra</a> – <?php echo __('Version', 'system'); ?> <?php echo Monstra::VERSION; ?></span>
131+
© 2012 - 2016 <a href="http://monstra.org/about/license" target="_blank">Monstra</a> – <?php echo __('Version', 'system'); ?> <?php echo Monstra::VERSION; ?>
132132
</div>
133-
134133
</div>
135-
136-
137134
</body>
138135
</html>

engine/Monstra.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class Monstra
3131
/**
3232
* The version of Monstra
3333
*/
34-
const VERSION = '3.0.2';
34+
const VERSION = '3.0.3';
3535

3636

3737
/**

engine/Plugin/I18n.php

+1
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ class I18n
3333
'fi' => 'Suomi',
3434
'fr' => 'Français',
3535
'gl' => 'Galego',
36+
'ka-ge' => 'Georgian',
3637
'hu' => 'Magyar',
3738
'it' => 'Italiano',
3839
'id' => 'Bahasa Indonesia',

engine/_init.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
<?php defined('MONSTRA_ACCESS') or die('No direct script access.');
22

33
/**
4-
* Monstra requires PHP 5.3.0 or greater
4+
* Monstra requires PHP 5.3.2 or greater
55
*/
6-
if (version_compare(PHP_VERSION, "5.3.0", "<")) {
7-
exit("Monstra requires PHP 5.3.0 or greater.");
6+
if (version_compare(PHP_VERSION, "5.3.2", "<")) {
7+
exit("Monstra requires PHP 5.3.2 or greater.");
88
}
99

1010
/**

install.php

100644100755
+4-4
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@
277277

278278

279279
<?php
280-
if (version_compare(PHP_VERSION, "5.2.3", "<")) {
280+
if (version_compare(PHP_VERSION, "5.3.2", "<")) {
281281
$errors['php'] = 'error';
282282
} else {
283283
$errors['php'] = '';
@@ -524,8 +524,8 @@
524524
<ul class="list-unstyled">
525525
<?php
526526

527-
if (version_compare(PHP_VERSION, "5.2.0", "<")) {
528-
echo '<li class="error alert alert-danger">'.__('PHP 5.2 or greater is required', 'system').'</li>';
527+
if (version_compare(PHP_VERSION, "5.3.2", "<")) {
528+
echo '<li class="error alert alert-danger">'.__('PHP 5.3.2 or greater is required', 'system').'</li>';
529529
} else {
530530
echo '<li class="ok alert alert-success">'.__('PHP Version', 'system').' '.PHP_VERSION.'</li>';
531531
}
@@ -603,7 +603,7 @@
603603

604604
<div class="install-block-footer login-footer">
605605
<div class="text-center">
606-
<span>© 2012 - 2015 <a href="http://monstra.org" class="small-grey-text" target="_blank">Monstra</a> – <?php echo __('Version', 'system'); ?> <?php echo Monstra::VERSION; ?></span>
606+
<span>© 2012 - 2016 <a href="http://monstra.org" class="small-grey-text" target="_blank">Monstra</a> – <?php echo __('Version', 'system'); ?> <?php echo Monstra::VERSION; ?></span>
607607
</div>
608608
</div>
609609

0 commit comments

Comments
 (0)