Ignore:
Timestamp:
Jan 24, 2004, 8:01:41 PM (21 years ago)
Author:
z0rglub
Message:
  • Php warning correction
  • bug 0000002 correction : forbidden characters on file are now checked
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/release-1_3/upload.php

    r299 r315  
    168168    array_push( $error, $lang['upload_err_username'] );
    169169  }
    170 
     170 
     171  $date_creation = '';
    171172  if ( $_POST['date_creation'] != '' )
    172173  {
     
    193194  $xml_infos.= ' name="'.htmlspecialchars( $_POST['name'], ENT_QUOTES).'"';
    194195  $xml_infos.= ' />';
     196
     197  if ( !preg_match( '/^[a-zA-Z0-9-_.]+$/', $_FILES['picture']['name'] ) )
     198  {
     199    // reload language file with administration labels
     200    $isadmin = true;
     201    include( './language/'.$user['language'].'.php' );
     202    array_push( $error, $lang['update_wrong_dirname'] );
     203  }
    195204 
    196205  if ( sizeof( $error ) == 0 )
Note: See TracChangeset for help on using the changeset viewer.