# I am the Watcher. I am your guide through this vast new twtiverse.
# 
# Usage:
#     https://watcher.sour.is/api/plain/users              View list of users and latest twt date.
#     https://watcher.sour.is/api/plain/twt                View all twts.
#     https://watcher.sour.is/api/plain/mentions?uri=:uri  View all mentions for uri.
#     https://watcher.sour.is/api/plain/conv/:hash         View all twts for a conversation subject.
# 
# Options:
#     uri     Filter to show a specific users twts.
#     offset  Start index for quey.
#     limit   Count of items to return (going back in time).
# 
# twt range = 1 7
# self = https://watcher.sour.is/conv/6wzkhqa
Oh geez this is driving me mad, I can't get maddy to do that one thing I want it to do on a CGI script I wrote.

#!/usr/local/bin/haserl --accept-all
Content-Type: text/html
<html>
<head>
<link rel="stylesheet" href="https://cdn.kyoko-project.wer.ee/@mirage/mirageCSS/dark.css">
<title>KyokoMail: Change account password</title>
</head>
<body>
<h1>Change account password for KyokoMail</h1>
<p>Warning: to use this form you <b>must</b> have an account on this service, otherwise, get out.</p>
<form action="<% /usr/local/bin/maddy creds password --password $FORM_new_password_again $FORM_username %>" method="GET">
<p>
Username:
<input type="text" name="username" cols="20" placeholder="username@kyoko-project.wer.ee" required="required"/>
</p>
<p>
Current password:
<input type="password" name="old_password" cols="20"  required="required"/>
</p>
<p>
New password:
<input type="password" name="new_password" cols="20"  required="required"/>
</p>
<p>
New password (repeat):
<input type="password" name="new_password_again" cols="20" required="required"/>
</p>
<input type="submit" value="Go" />
</form>
</body>
</html>
this totally looks fine to me, but it seems to be taken in the wrong order and with duplicate parameters besides the two I want it to actually read, and it errors out.
This is an updated revision (which throws the same error though):

#!/usr/local/bin/haserl --accept-all
Content-Type: text/html

<html>
<head>
<link rel="stylesheet" href="https://cdn.kyoko-project.wer.ee/@mirage/mirageCSS/dark.css">
<title>KyokoMail: Change account password</title>
</head>
<body>              
<h1>Change account password for KyokoMail</h1>
<p>Warning: to use this form you <b>must</b> have an account on this service, otherwise, get out.</p>
<form action="<% /usr/local/maddy/maddy creds password --password %>" method="GET">
<p>
Username:
<input type="text" name="username" cols="20" placeholder="username@kyoko-project.wer.ee" required="required"/>
</p>
<p>
New password:
<input type="password" name="new_password" cols="20" required="required"/>
</p>
<input type="submit" value="Go" />
</form>
</body>
</html>


Looks like I can't make use of haserl for these kind of things
@akoizumi Are you really sure that you want to pass all the data in the query of the URL? Sneaky admin! I recommend to use a POST form instead.
@lyse lol yeah I just realized.
@akoizumi Hahaha, I didn't think of that. :-D That showcases another famous source of trouble.