I consider this a bug, but maybe is the desired behavior.
If we add, in the security settings, a user and a password and we paste it with an space at the end, the space is not trimmed, so unless you add the space when entering these data later, the assessment can't be accesses.
Create an assessment
Set a user and apassword with an space at the end:
User "Diego "
Password "333 "
Enter as student, try to put "Diego" and/or "333" without the space at the end and it doesn't work.
Insert "Diego " and "333 " with the space at the end and it works.