This is not a bug at all; You use the /lock command in the wrong way...
The command does not take any parameter at all.
If you need to set a password you need to set it in the preferences as stated by Supersonicdarky...
This is also described on the
official help pages:
commands & tags
&
Instant Lock Tutorial