GithubHelp home page GithubHelp logo

symphonycms / maintenance_mode Goto Github PK

View Code? Open in Web Editor NEW
8.0 8.0 14.0 47 KB

Maintenance Mode for Symphony CMS

Home Page: http://symphonyextensions.com/extensions/maintenance_mode/

License: Other

PHP 100.00%
symphony-cms symphony-cms-extension

maintenance_mode's Introduction

Symphony CMS

Minimum PHP Version Build Status Build status Build status
Code coverage PHPStan Scrutinizer Code Quality Maintainability
Join the chat at https://gitter.im/symphonycms/symphony-2 Licence FOSSA Status

Contents

Quick links

Overview

Symphony is a PHP & MySQL based CMS that utilises XML and XSLT as its core technologies. This repository represents version 3.0.0 and is considered stable.

Useful places:

Server requirements

  • PHP 5.6 or 7.0-7.3
  • PHP’s LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.7 or above is recommended
  • A webserver (known to be used with Apache, Litespeed, Nginx and Hiawatha)
  • Apache’s mod_rewrite module or equivalent
  • PHP’s built in json functions, which are enabled by default in PHP 5.2 and above; if they are missing, ensure PHP wasn’t compiled with --disable-json
  • PHP’s zlib module
  • PHP’s pdo_mysql module

Responsible Security Disclosure

Please follow the guideline for security bug disclosure.

maintenance_mode's People

Contributors

alexbirukov avatar brendo avatar jonmifsud avatar klaftertief avatar lnikkila avatar miguelpayet avatar nickdunn avatar nilshoerrmann avatar nitriques avatar rainerborene avatar simoneeconomo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

maintenance_mode's Issues

Symphony Notice: Undefined variable: useragent

Affected Symphony version(s) : 3.0.0
PHP version(s) : 7.3.7
MySQL version(s): 5.7.26 Homebrew
OS(es) : macOS Catalina 10.15.3

The Preferences page throws the following error when the Maintenance Mode extension is enabled for Symphony 3.0:

An error occurred in /Users/stephen/Sites/symphonycms/extensions/maintenance_mode/extension.driver.php around line 93

88         $label = Widget::Label(__('Useragent Whitelist'));
89         $whitelist = json_decode(Symphony::Configuration()->get('useragent_whitelist', 'maintenance_mode'));
90         if (is_array($whitelist) && !empty($whitelist)) {
91             $useragent = implode("\r\n",$whitelist);
92         }
93         $label->appendChild(Widget::Textarea('settings[maintenance_mode][useragent_whitelist]', 5, 50, General::sanitize($useragent)));
94         $group->appendChild($label);
95 
96         // Append help
97         $group->appendChild(new XMLElement('p', __('Any useragent that listed above will be granted access. This eliminates the need to allow a

The error goes away by modifying the conditional.

// Useragent White list
$label = Widget::Label(__('Useragent Whitelist'));
$whitelist = json_decode(Symphony::Configuration()->get('useragent_whitelist', 'maintenance_mode'));
if (is_array($whitelist) && !empty($whitelist)) {
    $useragent = implode("\r\n",$whitelist);
    $label->appendChild(Widget::Textarea('settings[maintenance_mode][useragent_whitelist]', 5, 50, General::sanitize($useragent)));
    $group->appendChild($label);
}

HTTP status: Use 503 Service Unavailable

Hi,

For anonymous visitors, should not Maintenance Mode throw an HTTP status of 503 Service Unavailable? I'm thinking for search engines in particular so they know not to try to reindex a maintenance page for every URL in one's site as currently it appears to send 200 OK.

Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.