Skip to content

Commit

Permalink
Fix certain styles being unselectable in the user profile. #97
Browse files Browse the repository at this point in the history
  • Loading branch information
franzliedke committed Aug 17, 2010
1 parent eb0be00 commit 46b330f
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions profile.php
Expand Up @@ -830,9 +830,10 @@
// Make sure we got a valid style string
if (isset($_POST['form']['style']))
{
$form['style'] = preg_replace('#[\.\\\/]#', '', pun_trim($_POST['form']['style']));
if (!file_exists(PUN_ROOT.'style/'.$form['style'].'.css'))
message($lang_common['Bad request']);
$styles = forum_list_styles();
$form['style'] = pun_trim($_POST['form']['style']);
if (!in_array($form['style'], $styles))
message($lang_common['Bad request']);
}

break;
Expand Down

0 comments on commit 46b330f

Please sign in to comment.