summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--assets/point.webpbin0 -> 99366 bytes
-rw-r--r--assets/point.xcfbin14646 -> 45072 bytes
-rw-r--r--roseh.moe.go10
-rw-r--r--static/point.webpbin6078 -> 17478 bytes
-rw-r--r--templates/login.html.template5
5 files changed, 5 insertions, 10 deletions
diff --git a/assets/point.webp b/assets/point.webp
new file mode 100644
index 0000000..8c7405d
--- /dev/null
+++ b/assets/point.webp
Binary files differ
diff --git a/assets/point.xcf b/assets/point.xcf
index 80e0ed5..bfef35c 100644
--- a/assets/point.xcf
+++ b/assets/point.xcf
Binary files differ
diff --git a/roseh.moe.go b/roseh.moe.go
index f385899..cd443a6 100644
--- a/roseh.moe.go
+++ b/roseh.moe.go
@@ -554,8 +554,7 @@ var (
)
type loginTemplateArgs struct {
- Redirect string
- Error bool
+ Error bool
}
func redirectLogin(w http.ResponseWriter, r *http.Request, redirect string) {
@@ -564,7 +563,7 @@ func redirectLogin(w http.ResponseWriter, r *http.Request, redirect string) {
}
func serveLogin(w http.ResponseWriter, r *http.Request) {
- if err := loginTemplate.Execute(w, loginTemplateArgs{Redirect: r.FormValue("redirect")}); err != nil {
+ if err := loginTemplate.Execute(w, loginTemplateArgs{}); err != nil {
log.Printf("Warning: login: %s", err)
}
}
@@ -587,10 +586,7 @@ func verifyRedirect(redirect string) (string, bool) {
func login(w http.ResponseWriter, r *http.Request) {
if !checkPassword(r.FormValue("password"), r.FormValue("auth")) {
- if err := loginTemplate.Execute(w, loginTemplateArgs{
- Redirect: r.FormValue("redirect"),
- Error: true,
- }); err != nil {
+ if err := loginTemplate.Execute(w, loginTemplateArgs{Error: true}); err != nil {
log.Printf("Warning: login: %s", err)
}
return
diff --git a/static/point.webp b/static/point.webp
index 501e647..c9b732a 100644
--- a/static/point.webp
+++ b/static/point.webp
Binary files differ
diff --git a/templates/login.html.template b/templates/login.html.template
index e9ffe2b..1aef0f2 100644
--- a/templates/login.html.template
+++ b/templates/login.html.template
@@ -4,8 +4,7 @@
{{if .Error}}
<p class="login-error"><img class="inline" src="/static/angry.webp">Incorrect password</p>
{{end}}
- <form class="password-form" action="/login" method="post">
- <input type="hidden" name="redirect" value="{{.Redirect}}">
+ <form class="password-form" method="post">
<table>
<tr class="password-form-row">
<td><label class="password-label" for="password">Enter password</label></td>
@@ -17,7 +16,7 @@
</tr>
<tr>
<td></td>
- <td><input type="image" class="submit" src="/static/point.webp" alt="Submit"></td>
+ <td><input type="image" width="100" class="submit" src="/static/point.webp" alt="Submit"></td>
</table>
</form>
</section>