Skip to content
  • Lukas Fleischer's avatar
    Add PCRE_DOLLAR_ENDONLY to preg_match() · 237a4570
    Lukas Fleischer authored
    
    
    When using preg_match() to check for a match that starts at the
    beginning of the string and ends at the last character of the string, we
    do not want to allow an additional newline character to sneak in.
    Amongst other potential loopholes, adding the PCRE_DOLLAR_ENDONLY
    modifier prevents users from registering with user names that end with a
    newline character.
    
    Signed-off-by: default avatarLukas Fleischer <archlinux@cryptocrack.de>
    237a4570