Skip to content

sagyzdop/forum

Repository files navigation

Forum

This is a simple forum where you can share posts and discuss topics with others.

Features:

  • Create and share posts
  • Edit and delete your posts
  • Comment on posts
  • Vote on posts and comments
  • Filter posts by categories
  • Change your password

Starting the server

To run with make using Makefile (recommended):

make all

Try running make help to see what else is available. (Make is not a package.)

And go to localhost:4001 in your browser.

To build and run with Docker directly:

  1. Build the image:
docker build -t go-forum-sqlite .
  1. Create the necessary tables:
sqlite3 data/db.sqlite < data/init.sql

The database name is – db.sqlite. Use sqlite3 ./data/db.sqlite to run queries with sqlite3.

  1. Run the container:
docker run -d -p 4001:4001 -v "$(pwd)/data:/app/data" --name go_forum go-forum-sqlite

And go to localhost:4001 in your browser.

Comments

You can see the post created by you and the posts you liked on account page after you log in.

Some additional functionality as password update and post edit/delete is implemented. Moreover, I added pagination for scalability and faster load times. Although not relevant to audit, the backend handles some of the critical vulnerabilities when making custom request. For instance, creating likes for non-existent posts, or editing someone else's posts.

I personally think that these must be handled, and I will check for it if I get to audit Forum. However, other non-mutating request that result in 505 Server Error that can be seen only by sending custom requests, in my opinion, are okay.

Besides that, personally, I think the single-session behavior required by audit is unreasonable. No website in my experience has this behavior.

Acknowledgments

  • The look of the website is inspired by hackernews.
  • Session manager is inspired by Alex Edwards's scs package.
  • Special thanks to all the people that helped to test this project and make it better.

@byesbols

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages