• tryptaminev 🇵🇸 🇺🇦 🇪🇺@feddit.de
      link
      fedilink
      arrow-up
      2
      ·
      edit-2
      5 months ago

      Are they vulnerable though, if they already exclude it at the user input?

      I yet have to learn SQL and is there a way to allow passwords with '); DROP TABLE… without being vulnerable to an injection?

      nevermind i googled it, and there various ways to do so

      • rtxn@lemmy.world
        link
        fedilink
        English
        arrow-up
        1
        ·
        edit-2
        5 months ago

        Prepared statements, mostly. You define the query using variables, turn that query into a language-dependent object, assign values to those variables, then execute the statement. The values will be passed verbatim, without any parsing.

        Or, since we’re talking about a password, you could encode or encrypt it before inserting it into the query string. The fact that the website could be negatively affected by phrases in the cleartext password is very concerning.

      • herrvogel@lemmy.world
        cake
        link
        fedilink
        arrow-up
        1
        ·
        5 months ago

        This still smells though. Why is the raw, plain text password string getting anywhere near database queries in the first place?

    • pirrrrrrrr@lemmy.dbzer0.com
      link
      fedilink
      arrow-up
      0
      ·
      5 months ago

      Maybe they filtered those strings to be safe, and put the notice there to answer the invertible “why won’t it accept my password” queries.

      It’s a shitty password engine. But not necessarily uncleansed

      • ArbitraryValue@sh.itjust.works
        link
        fedilink
        English
        arrow-up
        1
        ·
        edit-2
        5 months ago

        If they’re trying to protect themselves from code injection by rejecting certain user input like that, then they don’t actually know how to protect themselves from code injection correctly and there may be serious vulnerabilities that they’ve missed.

        (I think it’s likely that, as others have said, they’re using off-the-shelf software that does properly sanitize user input, and that this is just the unnecessary result of management making ridiculous demands. Even then, it’s evidence of an organization that doesn’t have the right approach to security.)

  • lobut@lemmy.ca
    link
    fedilink
    arrow-up
    1
    ·
    5 months ago

    Looking at that I wouldn’t be surprised if those rules are just client-side validation.