bc8b23d35e
With a client IE < 10 there was a XSS security flaw. Other browsers were not affected. Also corrected spacing display with IE<10. (cherry picked from commit 28813cd82ae47e556b610da3c7302a6709e27431) Conflicts: CHANGELOG.md index.php js/zerobin.js lib/vizhash16x16.php
39 lines
788 B
PHP
39 lines
788 B
PHP
<?php
|
|
/**
|
|
* ZeroBin
|
|
*
|
|
* a zero-knowledge paste bin
|
|
*
|
|
* @link http://sebsauvage.net/wiki/doku.php?id=php:zerobin
|
|
* @copyright 2012 Sébastien SAUVAGE (sebsauvage.net)
|
|
* @license http://www.opensource.org/licenses/zlib-license.php The zlib/libpng License
|
|
* @version 0.19
|
|
*/
|
|
|
|
spl_autoload_register('auto::loader');
|
|
|
|
/**
|
|
* auto
|
|
*
|
|
* provides autoloading functionality
|
|
*/
|
|
class auto
|
|
{
|
|
/**
|
|
* strips slashes deeply
|
|
*
|
|
* @access public
|
|
* @static
|
|
* @param mixed $value
|
|
* @return mixed
|
|
*/
|
|
public static function loader($class_name)
|
|
{
|
|
$filename = PATH . 'lib/' . str_replace('_', '/', $class_name) . '.php';
|
|
if(is_readable($filename)) {
|
|
return include $filename;
|
|
}
|
|
return false;
|
|
}
|
|
}
|