Skip to content

Commit

Permalink
Merge branch 'master' into 1.5-next
Browse files Browse the repository at this point in the history
Conflicts:
	login.php
  • Loading branch information
franzliedke committed Nov 25, 2014
2 parents 5521b0b + 09b6a08 commit e47148b
Show file tree
Hide file tree
Showing 9 changed files with 1,299 additions and 1,303 deletions.
1,138 changes: 569 additions & 569 deletions admin_bans.php

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions admin_options.php
Expand Up @@ -705,14 +705,14 @@
<tr>
<th scope="row"><?php echo $lang_admin_options['Admin e-mail label'] ?></th>
<td>
<input type="text" name="form[admin_email]" size="50" maxlength="80" value="<?php echo $pun_config['o_admin_email'] ?>" />
<input type="text" name="form[admin_email]" size="50" maxlength="80" value="<?php echo pun_htmlspecialchars($pun_config['o_admin_email']) ?>" />
<span><?php echo $lang_admin_options['Admin e-mail help'] ?></span>
</td>
</tr>
<tr>
<th scope="row"><?php echo $lang_admin_options['Webmaster e-mail label'] ?></th>
<td>
<input type="text" name="form[webmaster_email]" size="50" maxlength="80" value="<?php echo $pun_config['o_webmaster_email'] ?>" />
<input type="text" name="form[webmaster_email]" size="50" maxlength="80" value="<?php echo pun_htmlspecialchars($pun_config['o_webmaster_email']) ?>" />
<span><?php echo $lang_admin_options['Webmaster e-mail help'] ?></span>
</td>
</tr>
Expand Down
2 changes: 1 addition & 1 deletion db_update.php
Expand Up @@ -7,7 +7,7 @@
*/

// The FluxBB version this script updates to
define('UPDATE_TO', '1.5.6');
define('UPDATE_TO', '1.5.7');

define('UPDATE_TO_DB_REVISION', 21);
define('UPDATE_TO_SI_REVISION', 2);
Expand Down
2 changes: 1 addition & 1 deletion include/common.php
Expand Up @@ -10,7 +10,7 @@
exit('The constant PUN_ROOT must be defined and point to a valid FluxBB installation root directory.');

// Define the version and database revision that this code was written for
define('FORUM_VERSION', '1.5.6');
define('FORUM_VERSION', '1.5.7');

define('FORUM_DB_REVISION', 21);
define('FORUM_SI_REVISION', 2);
Expand Down
32 changes: 32 additions & 0 deletions include/functions.php
Expand Up @@ -1075,6 +1075,38 @@ function confirm_referrer($scripts, $error_msg = false)
}


//
// Validate the given redirect URL, use the fallback otherwise
//
function validate_redirect($redirect_url, $fallback_url)
{
$referrer = parse_url(strtolower($redirect_url));

// Remove www subdomain if it exists
if (strpos($referrer['host'], 'www.') === 0)
$referrer['host'] = substr($referrer['host'], 4);

// Make sure the path component exists
if (!isset($referrer['path']))
$referrer['path'] = '';

$valid = parse_url(strtolower(get_base_url()));

// Remove www subdomain if it exists
if (strpos($valid['host'], 'www.') === 0)
$valid['host'] = substr($valid['host'], 4);

// Make sure the path component exists
if (!isset($valid['path']))
$valid['path'] = '';

if ($referrer['host'] == $valid['host'] && preg_match('%^'.preg_quote($valid['path'], '%').'/(.*?)\.php%i', $referrer['path']))
return $redirect_url;
else
return $fallback_url;
}


//
// Generate a random password of length $len
// Compatibility wrapper for random_key
Expand Down
2 changes: 1 addition & 1 deletion install.php
Expand Up @@ -7,7 +7,7 @@
*/

// The FluxBB version this script installs
define('FORUM_VERSION', '1.5.6');
define('FORUM_VERSION', '1.5.7');

define('FORUM_DB_REVISION', 21);
define('FORUM_SI_REVISION', 2);
Expand Down

0 comments on commit e47148b

Please sign in to comment.