diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2007-12-13 15:01:52 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2007-12-13 15:01:52 +0000 |
commit | f8329d45e1218678f97e74bd5f08d45dbaf6acd0 (patch) | |
tree | 7376df1081e41ad849a293e4b8546b7cc97e6e8d | |
parent | 424a7f46e8070dc0bacb3bd7ecaf639977a6bcc0 (diff) | |
download | mga-youri-submit-f8329d45e1218678f97e74bd5f08d45dbaf6acd0.tar mga-youri-submit-f8329d45e1218678f97e74bd5f08d45dbaf6acd0.tar.gz mga-youri-submit-f8329d45e1218678f97e74bd5f08d45dbaf6acd0.tar.bz2 mga-youri-submit-f8329d45e1218678f97e74bd5f08d45dbaf6acd0.tar.xz mga-youri-submit-f8329d45e1218678f97e74bd5f08d45dbaf6acd0.zip |
- empty {authorized_users} doesn't imply every one is allowed to bypass freeze check!
- {authorized_users} should be checked more strictly
-rw-r--r-- | lib/Youri/Submit/Check/Version.pm | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Youri/Submit/Check/Version.pm b/lib/Youri/Submit/Check/Version.pm index f8567eb..71b2686 100644 --- a/lib/Youri/Submit/Check/Version.pm +++ b/lib/Youri/Submit/Check/Version.pm @@ -42,7 +42,7 @@ sub run { if ($opt->{mode} eq 'version_freeze') { return if $section =~ /$opt->{authorized_sections}/; my $user = $define->{user}; - return if $user =~ /$opt->{authorized_users}/; + return if $user =~ /^($opt->{authorized_users})$/; my ($package_version) = $package =~ /-([^-]+)-[^-]+\.src$/; $define->{arch} = 'src'; my @revisions = $repository->get_revisions($package, $target, $define, undef, @@ -59,7 +59,7 @@ sub run { # FIXME: The following code is not working and must be reviewed. elsif ($opt->{mode} eq 'freeze') { my $user = $define->{user}; - return if $user =~ /$opt->{authorized_users}/; + return if $user =~ /^($opt->{authorized_users})$/; # XXX: So freeze mode really only check for this exceptions? if ($section !~ /$opt->{authorized_sections}/) { return "FREEZE: repository $target section $section is frozen, you can still submit your packages in testing\nTo do so use your.devel --define section=<section> $target <package 1> <package 2> ... <package n>"; |