Go to file
Robin Malley 9444d300b8 Allow logged in users to use their session immediately.
Fix a bug where unit tests are attempting to log in and use their
session key in the same second that the session key was created.
2021-09-11 21:50:23 +00:00
assets Try to hint reader mode better. 2021-04-09 20:03:24 +00:00
conf Add bookmark script. 2021-04-04 06:11:55 +00:00
kore_chroot Add gitignores 2020-05-17 12:10:01 -04:00
spec Mark unit test as slow. 2021-09-11 21:46:23 +00:00
src Allow logged in users to use their session immediately. 2021-09-11 21:50:23 +00:00
tools Add some tools for interfaceing with smr 2021-02-09 02:41:41 +00:00
.gitignore Remove extra prints 2020-12-23 06:07:00 +00:00
Makefile Exclude slow tests in make test 2021-09-11 21:43:32 +00:00
README.md Update readme 2021-02-22 07:46:57 +00:00
dh2048.pem Inital commit 2020-05-15 19:10:20 -04:00

README.md

SMR

Overview

This repository contains the source code to a pastebin clone. It was made after concerns with pastebin.com taking down certain kinds of content. SMR aims to be small, fast, and secure. It is built on top of Kore, using luajit to expose a Lua programming environment. It uses sqlite3 as it's database. SMR is implemented in about 3.5k SLOC and is expected to never exceed 5k SLOC. Contributions welcome.

Roadmap

  • Accounts (complete)
  • Comments (complete)
  • Tags (complete)
  • Search (complete)
  • Archive (in progress)
  • Author biographies

TODO's: Currently, people can post comments to unlisted stories even if they don't have the correct link.

Hacking

If you want to contribute to this repository:

  1. Install the kore webserver(Documentation -> installation)
  2. Use a kodev create smr to create a blank kore application
  3. Install Lua and Luarocks from your package manager
  4. Use Luarocks to install the following dependencies (luarocks install <package>)
  • etlua - Lua templating, comparable to Jinja for Python
  • lpeg - Parsing Expression Grammers, used to build text parsers
  • lsqlite3 - Sqlite3 for Lua, a lightweight database
  • lua-zlib - Data compression
  1. You may need to modify conf/build.conf, I use Lua 5.1 on my development machine, but everything should still work with later versions.
  2. Install spp
  3. Clone this repository into the smr folder, cd into the root, and run make!
  • You may need to modify the configuration in the Makefile, add test.monster 127.0.0.1 to your /etc/hosts, modify command invocation, ect.

Misc notes.

SMR requires a slightly modified version of Kore to run. See my kore patches for the changes I needed to make to get the JIT compiler playing nice with Kore's seccomp restrictions. There are a few other changes, like modified kore to accept any text as input for things like file upload.

UPDATE (12/18/2020)

Kore 4.0 no longer needs the seccomp changes, as those have been exposed to library users, and smr has been updated appropriately. It still needs the allow-multiline-input patch though.