Migrate remaining footnote-style collection access in examples, public/structure, and ext/lib smokes to [key](base); teach link-index in structure pages and use bracket calls in the cafe journal example. Co-authored-by: Cursor <cursoragent@cursor.com>
1.0 KiB
1.0 KiB
title: web security smoke (W3) description: Password hash ABI + legacy plaintext login (offline). import web:ext/web/web.mq.md import plugin:lib/plugin.mq.md import sys:lib/sys.mq.md
main
p = > plugin.native_path name="web"
p
plugin.load path=
p
sys.exit code=1
hash = > web_password_hash password="secret" h = hash
h!= ""
print text=hash-ok
print text=hash-fail
users =
| 行 | 用户 | 密码 |
|---|---|---|
| 1 | admin | secret |
login = > web_auth_login username="admin" password="secret" users=users session_ttl=120
lok = ok
lok
print text=auth-login-ok
print text=auth-login-fail
bad = > web_auth_login username="admin" password="wrong" users=users session_ttl=120
bok = ok
bok
print text=auth-bad-should-fail
print text=auth-bad-reject-ok