ltheinrich / gorum

Lightweight forum software written in Go and Angular (unmaintained)
https://ltheinrich.de/gorum
ISC License
19 stars 7 forks source link

Disallow creating threads in non-existing boards #32

Closed NathanNr closed 5 years ago

NathanNr commented 5 years ago

error

ltheinrich commented 5 years ago

When does this happen? How to reproduce?

ltheinrich commented 5 years ago

It happens in the new non-existing threads view, right?

NathanNr commented 5 years ago

It happens if you change the URL to a non-existing board (e.g. /new-thread/-1) and try to publish a thread.

Ampferl commented 5 years ago

An idea as a proposed solution would be: When requesting the page, check in the database if the board, thread and user exist and if not redirect to start page / error page. This check should be on every board, thread and user-profile as well as at the new-thread page.

ltheinrich commented 5 years ago

The page already exists, but the button is still visible.

There are some more possible errors:

There should also be a message when you get redirected to another page if you are not logged in

ltheinrich commented 5 years ago

Fixed in 7af81b9921974a750b73e18580c00bcf426e9a07