• turmacar@lemmy.world
    link
    fedilink
    arrow-up
    2
    arrow-down
    1
    ·
    10 个月前

    The hash or a checksum can be sent to the page to be checked by the same function running in your browser that is checking if the new password has special characters etc.

    • Vigge93@lemmy.world
      link
      fedilink
      arrow-up
      11
      ·
      10 个月前

      That would be an extremely bad idea tho, because it would allow a malicious attacker to

      1. Try random usernames, and if the website returns a hash they know that user exists
      2. Once they have the hash, and the hashing algoritm, it is much easier to brute-force the password, bypassing any safeguards on the server

      Username/password validation should happen entirely server-side, with as little information as possible provided to the client

      • grrgyle@slrpnk.net
        link
        fedilink
        arrow-up
        7
        ·
        10 个月前

        Username/password validation should happen entirely server-side, with as little information as possible provided to the client

        Yyyup. This is why you also why it’s good practice to respond with HTTP 404 if a public user has tried to access user data they shouldn’t have access to, whether it exists or not. Don’t give them the hint that they hit a path that has forbidden data.

      • aesthelete@lemmy.world
        link
        fedilink
        arrow-up
        3
        ·
        10 个月前

        Username/password validation should happen entirely server-side, with as little information as possible provided to the client

        💯

        It’s recommended practice to not even tell them which half of the username/password combination failed upon authentication failures.

    • testfactor@lemmy.world
      link
      fedilink
      arrow-up
      5
      ·
      10 个月前

      Seems like a great way for me to harvest a bunch of hashes to pull down to my GPU rig and crack offline.