Bcrypt Custom password configuration

前端 未结 2 988
南方客
南方客 2021-01-29 10:37

i am changing the password and then forwarding to /loginuser and redirect to users dashboard. i had secured this with httpbasic authentication since i am a beginner, I am using

2条回答
  •  有刺的猬
    2021-01-29 11:33

    I think you have a problem because your encoded password has a length < 28, from spring sources:

    if (saltLength < 28) {
                throw new IllegalArgumentException("Invalid salt");
    }
    

    how to fix that:

    1. Increase salt rounds to 10
    2. Try to set minimum password length to 4-5

    I hope that helps.

提交回复
热议问题