Skip to content
Snippets Groups Projects
  • Steve Holme's avatar
    e17c1b25
    base64: Added basic validation to base64 input string when decoding · e17c1b25
    Steve Holme authored
    A base64 string should be a multiple of 4 characters in length, not
    contain any more than 2 padding characters and only contain padding
    characters at the end of string. For example: Y3VybA==
    
    Strings such as the following are considered invalid:
    
    Y=   - Invalid length
    Y==  - Invalid length
    Y=== - More than two padding characters
    Y=x= - Padding character contained within string
    e17c1b25
    History
    base64: Added basic validation to base64 input string when decoding
    Steve Holme authored
    A base64 string should be a multiple of 4 characters in length, not
    contain any more than 2 padding characters and only contain padding
    characters at the end of string. For example: Y3VybA==
    
    Strings such as the following are considered invalid:
    
    Y=   - Invalid length
    Y==  - Invalid length
    Y=== - More than two padding characters
    Y=x= - Padding character contained within string