Skip to content

Commit

Permalink
Item9341: validate tainted group name
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.foswiki.org/trunk@8206 0b4bb1d4-4e5a-0410-9cc4-b2b747904278
  • Loading branch information
CrawfordCurrie authored and CrawfordCurrie committed Jul 16, 2010
1 parent 978f30d commit 0a5e048
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
Expand Up @@ -57,8 +57,8 @@ Other sections define the fields and extra info text.
<input type="hidden" name="action" value="register" />
</form>
</div>
%ADDTOHEAD{"UserRegistrationStyle"
text="<style type=\"text/css\" media=\"all\">
%ADDTOZONE{"head" tag="UserRegistrationStyle"
text="<style type='text/css' media='all'>
.registration .foswikiFormSteps {
margin:.5em 0 1em 0;
}
Expand Down Expand Up @@ -128,7 +128,7 @@ text="<style type=\"text/css\" media=\"all\">
color:#f00;
}
</style>
<script type=\"text/javascript\" src=\"%PUBURL%/%SYSTEMWEB%/JavascriptFiles/foswikiString.js\"></script>"
<script type='text/javascript' src='%PUBURL%/%SYSTEMWEB%/JavascriptFiles/foswikiString.js'></script>"
}%%ENDSECTION{"form"}%


Expand Down
5 changes: 5 additions & 0 deletions TopicUserMappingContrib/lib/Foswiki/Users/TopicUserMapping.pm
Expand Up @@ -595,6 +595,11 @@ sub eachGroupMember {
my $this = shift;
my $group = shift;

if (Scalar::Util::tainted($group)) {
$group = Foswiki::Sandbox::untaint(
$group, \&Foswiki::Sandbox::validateTopicName);
}

return new Foswiki::ListIterator( $this->{eachGroupMember}->{$group} )
if ( defined( $this->{eachGroupMember}->{$group} ) );

Expand Down

0 comments on commit 0a5e048

Please sign in to comment.