Show
Ignore:
Timestamp:
03/10/10 14:45:40 (6 months ago)
Author:
ejhernandez@…
Message:

BP: Bugfix: Only ASCII alphanumeric characters are allowed in common name to workaround the yet not fixed issue with UTF-8 and OpenSSL

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/client/ca/src/EBox/CGI/IssueCertificate.pm

    r16999 r17024  
    140140    } 
    141141 
     142    # XXX: We have set a workaround until UTF-8 are allowed in OpenSSL 
    142143    # Only valid chars minus '/' plus '*' --> security risk 
    143     unless ( $name =~ m{^[\w .?&+:\-\@\*]*$} ) { 
    144       throw EBox::Exceptions::External(__('The input contains invalid ' . 
    145                                           'characters. All alphanumeric characters, ' . 
     144    unless ( $name =~ m{^[A-Za-z0-9 .?&+:\-\@\*]*$} ) { 
     145      throw EBox::Exceptions::External(__x('The input contains invalid ' . 
     146                                          'characters. All {ascii} alphanumeric characters, ' . 
    146147                                          'plus these non alphanumeric chars: .?&+:-@* ' . 
    147                                           'and spaces are allowed.')); 
     148                                          'and spaces are allowed.', 
     149                                          ascii => 'ASCII')); 
    148150    } 
    149151