Changeset 11515 for trunk

Show
Ignore:
Timestamp:
10/20/08 08:30:18 (3 months ago)
Author:
javier.amor.garcia@…
Message:

daemon names are restricted to alphanumerics and -. _, . characters

Location:
trunk/client/openvpn
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • trunk/client/openvpn/ChangeLog

    r11490 r11515  
     10.12.100 
     2        + Daemon names are restricted to alphanumerics and '-'. '_', '.' characters 
    130.12.99 
    24        + New release 
  • trunk/client/openvpn/src/EBox/OpenVPN.pm

    r11123 r11515  
    632632# Method: checkNewDaemonName 
    633633# 
    634 #    Check if the name for a new daemon does nto conflict with the actual 
    635 #    configuration 
     634#    Check if the name for a new daemon is correct and does not conflicts with 
     635#    the actual configuration 
    636636# 
    637637#  Parameters: 
     
    642642{ 
    643643    my ($self, $name, $daemonType, $internal) = @_; 
     644 
     645    if (not $name =~ m/^[\w\.\-]+$/) { 
     646        throw EBox::Exceptions::External( 
     647            __x( 
     648              q{Invalid name {name}. Only alpahanumeric  and '-', '_', '.' characters are allowed}, 
     649                name => $name, 
     650 
     651            ) 
     652                                        ) 
     653    } 
    644654 
    645655    # check if the daemon name is repeated in others daemon types