Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Validate the module name
  • Loading branch information
piojo-zz committed Oct 21, 2013
1 parent 8f7f674 commit 0aec63d
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/main/perl/ComponentProxyList.pm
Expand Up @@ -392,8 +392,6 @@ sub _sortComponents
}




#
# _getComponents(): boolean
# instantiates the list of components specified in new(). If
Expand Down Expand Up @@ -422,6 +420,11 @@ sub _getComponents {
if ($prop->getBooleanValue() eq 'true') {
if ($cfg->elementExists("/software/components/$cname/ncm-module")) {
$module = $cfg->getValue("/software/components/$cname/ncm-module");
if ($module !~ m{^([a-z_]\w*(?:::)?)+}) {
$self->error("Invalid module $module for component $cname");
return undef;
}
$module = $1;
}
push(@compnames,$module);
}
Expand Down

0 comments on commit 0aec63d

Please sign in to comment.