HUGE BUG in version 4.2 ?

  •  10-03-2005, 7:24 AM

    HUGE BUG in version 4.2 ?

    Hey. 
    I received version 4.2 from Karen, but this time I can not upload anything else than images...

    I went through your code and found the following :

    [CODE SNIPPET from filePost.asp] 
    For Each File In Uploader.Files.Items
                if ValidFileName(File.FileName) = false then
                      Response.Write "<font color=red><b>File name not supported!</b></font><br><br>Please keep the file name one word with no spaces or special characters."
                ElseIf ValidFileExtension(File.FileName) = false then
                      Response.Write "<font color=red><b>File format not supported!</b></font>"                                               
                else
                    ... etc ...
    [/SNIPPET]
     
    The ValidFileName method looks like this :
     
    [CODE SNIPPET from filePost.asp] 
    Function ValidFileName(str_FileName)
          Set RegularExpressionObject = New RegExp
          With RegularExpressionObject
                .Pattern = "^\w+\.(gif|jpg|jpeg|png|bmp)$"
                .IgnoreCase = True
                .Global = True
          End With
         
          ValidFileName = RegularExpressionObject.Test(str_FileName)
    End Function
    [/SNIPPET]
     
    So, even if you specify all accepted file types in ValidFileExtension and ValidMedia, you will never be able to upload them !?
    Only gif, jpg, jpeg, png and bmp files are accepted !?
     
    Regards.
    K.
View Complete Thread