fix: correct set-password docstring (scrypt, not bcrypt) #4
@@ -60,12 +60,9 @@ def show_cmd(config_path: str | None) -> None:
|
|||||||
@config_cmd.command("set-password")
|
@config_cmd.command("set-password")
|
||||||
@click.option("--config", "-c", "config_path", default=None, help="Path to vigilar.toml.")
|
@click.option("--config", "-c", "config_path", default=None, help="Path to vigilar.toml.")
|
||||||
def set_password_cmd(config_path: str | None) -> None:
|
def set_password_cmd(config_path: str | None) -> None:
|
||||||
"""Generate a bcrypt hash for the web UI password."""
|
"""Generate a scrypt hash for the web UI password."""
|
||||||
try:
|
try:
|
||||||
import hashlib
|
|
||||||
|
|
||||||
password = click.prompt("Enter web UI password", hide_input=True, confirmation_prompt=True)
|
password = click.prompt("Enter web UI password", hide_input=True, confirmation_prompt=True)
|
||||||
# Use SHA-256 hash (bcrypt requires external dep, but cryptography is available)
|
|
||||||
from cryptography.hazmat.primitives.kdf.scrypt import Scrypt
|
from cryptography.hazmat.primitives.kdf.scrypt import Scrypt
|
||||||
import os
|
import os
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user