mirror of
				https://github.com/mail-in-a-box/mailinabox.git
				synced 2025-11-03 19:30:54 +00:00 
			
		
		
		
	Merge 003cc59378 into 2caddb41eb
				
					
				
			This commit is contained in:
		
						commit
						9ad336a057
					
				@ -19,6 +19,8 @@ Control Panel/Management:
 | 
				
			|||||||
* Fix an error in the control panel showing rsync backup status.
 | 
					* Fix an error in the control panel showing rsync backup status.
 | 
				
			||||||
* Fix an error in the control panel related to IPv6 addresses.
 | 
					* Fix an error in the control panel related to IPv6 addresses.
 | 
				
			||||||
* TLS certificates for internationalized domain names can now be provisioned from Let's Encrypt automatically.
 | 
					* TLS certificates for internationalized domain names can now be provisioned from Let's Encrypt automatically.
 | 
				
			||||||
 | 
					* Updated jQuery to use local files
 | 
				
			||||||
 | 
					* Updated Bootstrap to use local files
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
v0.22 (April 2, 2017)
 | 
					v0.22 (April 2, 2017)
 | 
				
			||||||
 | 
				
			|||||||
@ -32,6 +32,7 @@ with open(os.path.join(os.path.dirname(me), "csr_country_codes.tsv")) as f:
 | 
				
			|||||||
		csr_country_codes.append((code, name))
 | 
							csr_country_codes.append((code, name))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
app = Flask(__name__, template_folder=os.path.abspath(os.path.join(os.path.dirname(me), "templates")))
 | 
					app = Flask(__name__, template_folder=os.path.abspath(os.path.join(os.path.dirname(me), "templates")))
 | 
				
			||||||
 | 
					app._static_folder = os.path.abspath(os.path.join(os.path.dirname(me), "static"))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Decorator to protect views that require a user with 'admin' privileges.
 | 
					# Decorator to protect views that require a user with 'admin' privileges.
 | 
				
			||||||
def authorized_personnel_only(viewfunc):
 | 
					def authorized_personnel_only(viewfunc):
 | 
				
			||||||
 | 
				
			|||||||
@ -9,7 +9,7 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
        <meta name="robots" content="noindex, nofollow">
 | 
					        <meta name="robots" content="noindex, nofollow">
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
 | 
					        <link rel="stylesheet" href="/assets/css/lib/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
 | 
				
			||||||
        <style>
 | 
					        <style>
 | 
				
			||||||
	    body {
 | 
						    body {
 | 
				
			||||||
		overflow-y: scroll;
 | 
							overflow-y: scroll;
 | 
				
			||||||
@ -63,7 +63,7 @@
 | 
				
			|||||||
	       margin-bottom: 1em;
 | 
						       margin-bottom: 1em;
 | 
				
			||||||
	    }
 | 
						    }
 | 
				
			||||||
        </style>
 | 
					        </style>
 | 
				
			||||||
        <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap-theme.min.css" integrity="sha384-rHyoN1iRsVXV4nD0JutlnGaslCJuC7uwjduW9SVrLvRYooPp2bWYgmgJQIXwl/Sp" crossorigin="anonymous">
 | 
					        <link rel="stylesheet" href="/assets/css/lib/bootstrap-theme.min.css" integrity="sha384-rHyoN1iRsVXV4nD0JutlnGaslCJuC7uwjduW9SVrLvRYooPp2bWYgmgJQIXwl/Sp" crossorigin="anonymous">
 | 
				
			||||||
    </head>
 | 
					    </head>
 | 
				
			||||||
    <body>
 | 
					    <body>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -191,8 +191,8 @@
 | 
				
			|||||||
          </div>
 | 
					          </div>
 | 
				
			||||||
        </div>
 | 
					        </div>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js" integrity="sha256-rsPUGdUPBXgalvIj4YKJrrUlmLXbOb6Cp7cdxn1qeUc=" crossorigin="anonymous"></script>
 | 
					        <script src="/assets/js/lib/jquery-2.1.4.min.js" integrity="sha256-8WqyJLuWKRBVhxXIL1jBDD7SDxU936oZkCnxQbWwJVw=" crossorigin="anonymous"></script>
 | 
				
			||||||
        <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
 | 
					        <script src="/assets/js/lib/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        <script>
 | 
					        <script>
 | 
				
			||||||
var global_modal_state = null;
 | 
					var global_modal_state = null;
 | 
				
			||||||
@ -218,7 +218,7 @@ $(function() {
 | 
				
			|||||||
    if (global_modal_state == null) global_modal_state = 1; // cancel if the user hit ESC or clicked outside of the modal
 | 
					    if (global_modal_state == null) global_modal_state = 1; // cancel if the user hit ESC or clicked outside of the modal
 | 
				
			||||||
    if (global_modal_funcs && global_modal_funcs[global_modal_state])
 | 
					    if (global_modal_funcs && global_modal_funcs[global_modal_state])
 | 
				
			||||||
      global_modal_funcs[global_modal_state]();
 | 
					      global_modal_funcs[global_modal_state]();
 | 
				
			||||||
  })  
 | 
					  })
 | 
				
			||||||
})
 | 
					})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
function show_modal_error(title, message, callback) {
 | 
					function show_modal_error(title, message, callback) {
 | 
				
			||||||
@ -281,7 +281,7 @@ function ajax_with_indicator(options) {
 | 
				
			|||||||
  };
 | 
					  };
 | 
				
			||||||
  options.error = function(jqxhr) {
 | 
					  options.error = function(jqxhr) {
 | 
				
			||||||
    hide_loading_indicator();
 | 
					    hide_loading_indicator();
 | 
				
			||||||
    if (!old_error) 
 | 
					    if (!old_error)
 | 
				
			||||||
      show_modal_error("Error", "Something went wrong, sorry.")
 | 
					      show_modal_error("Error", "Something went wrong, sorry.")
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      old_error(jqxhr.responseText, jqxhr);
 | 
					      old_error(jqxhr.responseText, jqxhr);
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										38
									
								
								setup/web.sh
									
									
									
									
									
								
							
							
						
						
									
										38
									
								
								setup/web.sh
									
									
									
									
									
								
							@ -86,6 +86,43 @@ if [ ! -f $STORAGE_ROOT/www/default/index.html ]; then
 | 
				
			|||||||
fi
 | 
					fi
 | 
				
			||||||
chown -R $STORAGE_USER $STORAGE_ROOT/www
 | 
					chown -R $STORAGE_USER $STORAGE_ROOT/www
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# download jQuery and Bootstrap local files
 | 
				
			||||||
 | 
					if [ ! -d $STORAGE_ROOT/www/default/assets ]; then
 | 
				
			||||||
 | 
						echo "Downloading Assets (jQuery/Bootstrap)..."
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						js_lib=$STORAGE_ROOT/www/default/assets/js/lib
 | 
				
			||||||
 | 
						css_lib=$STORAGE_ROOT/www/default/assets/css/lib
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						#jQuery CDN URL
 | 
				
			||||||
 | 
						jquery_version=2.1.4
 | 
				
			||||||
 | 
						jquery_url=https://code.jquery.com
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						#Bootstrap CDN URL
 | 
				
			||||||
 | 
						bootstrap_version=3.3.7
 | 
				
			||||||
 | 
						bootstrap_url=https://maxcdn.bootstrapcdn.com/bootstrap/$bootstrap_version
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						#get the Javascript files
 | 
				
			||||||
 | 
						if [ ! -d $js_lib ]; then
 | 
				
			||||||
 | 
							mkdir -p $js_lib
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							wget_verify $jquery_url/jquery-$jquery_version.min.js 43dc554608df885a59ddeece1598c6ace434d747 $js_lib/jquery-$jquery_version.min.js
 | 
				
			||||||
 | 
							wget_verify $bootstrap_url/js/bootstrap.min.js 430a443d74830fe9be26efca431f448c1b3740f9 $js_lib/bootstrap.min.js
 | 
				
			||||||
 | 
						fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						# get the CSS(map) files
 | 
				
			||||||
 | 
						if [ ! -d $css_lib ]; then
 | 
				
			||||||
 | 
							mkdir -p $css_lib
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							wget_verify $bootstrap_url/css/bootstrap-theme.min.css 8256575374f430476bdcd49de98c77990229ce31 $css_lib/bootstrap-theme.min.css
 | 
				
			||||||
 | 
							wget_verify $bootstrap_url/css/bootstrap-theme.min.css.map 87f7dfd79d77051ac2eca7d093d961fbd1c8f6eb $css_lib/bootstrap-theme.min.css.map
 | 
				
			||||||
 | 
							wget_verify $bootstrap_url/css/bootstrap.min.css 6527d8bf3e1e9368bab8c7b60f56bc01fa3afd68 $css_lib/bootstrap.min.css
 | 
				
			||||||
 | 
							wget_verify $bootstrap_url/css/bootstrap.min.css.map e0d7b2bde55a0bac1b658a507e8ca491a6729e06 $css_lib/bootstrap.min.css.map
 | 
				
			||||||
 | 
						fi
 | 
				
			||||||
 | 
					fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# We previously installed a custom init script to start the PHP FastCGI daemon. #NODOC
 | 
					# We previously installed a custom init script to start the PHP FastCGI daemon. #NODOC
 | 
				
			||||||
# Remove it now that we're using php5-fpm. #NODOC
 | 
					# Remove it now that we're using php5-fpm. #NODOC
 | 
				
			||||||
if [ -L /etc/init.d/php-fastcgi ]; then
 | 
					if [ -L /etc/init.d/php-fastcgi ]; then
 | 
				
			||||||
@ -108,4 +145,3 @@ restart_service php5-fpm
 | 
				
			|||||||
# Open ports.
 | 
					# Open ports.
 | 
				
			||||||
ufw_allow http
 | 
					ufw_allow http
 | 
				
			||||||
ufw_allow https
 | 
					ufw_allow https
 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user