mirror of
https://github.com/phpbb/phpbb.git
synced 2025-02-25 12:33:29 +01:00
do not allow [flash=0,0]... not implemented for images due to the reliance on getimagesize() - as usual both sizes are able to be limited by the maximum/minimum image size configuration options
git-svn-id: file:///svn/phpbb/trunk@8614 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
4dddc3a130
commit
7524ca5249
@ -346,6 +346,12 @@ class bbcode_firstpass extends bbcode
|
|||||||
$in = trim($in);
|
$in = trim($in);
|
||||||
$error = false;
|
$error = false;
|
||||||
|
|
||||||
|
// Do not allow 0-sizes generally being entered
|
||||||
|
if ($width <= 0 || $height <= 0)
|
||||||
|
{
|
||||||
|
return '[flash=' . $width . ',' . $height . ']' . $in . '[/flash]';
|
||||||
|
}
|
||||||
|
|
||||||
// Apply the same size checks on flash files as on images
|
// Apply the same size checks on flash files as on images
|
||||||
if ($config['max_' . $this->mode . '_img_height'] || $config['max_' . $this->mode . '_img_width'])
|
if ($config['max_' . $this->mode . '_img_height'] || $config['max_' . $this->mode . '_img_width'])
|
||||||
{
|
{
|
||||||
|
@ -39,7 +39,7 @@ class session
|
|||||||
*
|
*
|
||||||
* @param string $root_path current root path (phpbb_root_path)
|
* @param string $root_path current root path (phpbb_root_path)
|
||||||
*/
|
*/
|
||||||
function extract_current_page($root_path)
|
public static function extract_current_page($root_path)
|
||||||
{
|
{
|
||||||
$page_array = array();
|
$page_array = array();
|
||||||
|
|
||||||
@ -160,7 +160,7 @@ class session
|
|||||||
$this->referer = (!empty($_SERVER['HTTP_REFERER'])) ? htmlspecialchars((string) $_SERVER['HTTP_REFERER']) : '';
|
$this->referer = (!empty($_SERVER['HTTP_REFERER'])) ? htmlspecialchars((string) $_SERVER['HTTP_REFERER']) : '';
|
||||||
$this->forwarded_for = (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) ? (string) $_SERVER['HTTP_X_FORWARDED_FOR'] : '';
|
$this->forwarded_for = (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) ? (string) $_SERVER['HTTP_X_FORWARDED_FOR'] : '';
|
||||||
$this->host = (!empty($_SERVER['HTTP_HOST'])) ? (string) strtolower($_SERVER['HTTP_HOST']) : ((!empty($_SERVER['SERVER_NAME'])) ? $_SERVER['SERVER_NAME'] : getenv('SERVER_NAME'));
|
$this->host = (!empty($_SERVER['HTTP_HOST'])) ? (string) strtolower($_SERVER['HTTP_HOST']) : ((!empty($_SERVER['SERVER_NAME'])) ? $_SERVER['SERVER_NAME'] : getenv('SERVER_NAME'));
|
||||||
$this->page = $this->extract_current_page(PHPBB_ROOT_PATH);
|
$this->page = self::extract_current_page(PHPBB_ROOT_PATH);
|
||||||
|
|
||||||
// if the forwarded for header shall be checked we have to validate its contents
|
// if the forwarded for header shall be checked we have to validate its contents
|
||||||
if ($config['forwarded_for_check'])
|
if ($config['forwarded_for_check'])
|
||||||
|
Loading…
x
Reference in New Issue
Block a user