Skip to content

C:\fakepath\ is added to length when checking the length of a file type #1615

Closed
@zoo1

Description

@zoo1

C:\fakepath\ is added in to the value field of file inputs. This should be stripped out when validated. The validators affected are maxlength, minlength, rangelength, range, min, and max. My current solution is to add b=a(c).attr('type')=='file'?b.replace(/C:\fakepath\/i,''); to each of the validators. However, I know this is not an elegant solution and was wondering if one the maintainers could point me in the right direction.

Testing Notes:
test form: https://jsfiddle.net/zp423Lup/6/
test file to downloaded file: https://www.owasp.org/images/5/52/OWASP_Testing_Guide_v4.pdf
note that the length of the file name is 26 characters and the maxlength is 30 characters so it should pass.

Browsers affected: latest version of Chrome and Safari
Plug-in Versions affected: v1.13.0 - latest

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy