Skip to content

Commit

Permalink
update readme and bughunters
Browse files Browse the repository at this point in the history
  • Loading branch information
zekroTJA committed Oct 17, 2020
1 parent 3de2db9 commit 865a5db
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 28 deletions.
33 changes: 6 additions & 27 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,41 +1,20 @@
1.3.0
1.3.1

> MAJOR PATCH
> MINOR PATCH
## Major Implementations
## Minor Improvements

**Karma System Settings** [#146]

The Karma System is now configurable via the web interface. If you have the permission `sp.guild.config.karma`, you will see this entry in the guild settings of the web interface:
![](https://i.imgur.com/HiaUhJO.png)
There, you can enter the advanced guild settings interface where you can define preferences like enable or disable the karma system, emojis used to increase or decrease karma or the ammount of tokens available per hour per user.
![](https://i.imgur.com/CC7AgCV.png)

**Channel Locking** [#165]

Added the [`lock`](https://github.com/zekroTJA/shinpuru/wiki/Commands#lock) command to write-lock text channels. By either typing `sp!lock` into the channel which shall be locked or remotely by passing a channel resolvable (i.e. `sp!lock general`), you can write-lock channels. That means, that all roles in this channel (*below the role of the executor*) are explicitly disallowed to write messages in this channel. When hitting the same command again onto this channel, the permission state before the first execution of the `lock` command are restored.
![](https://i.imgur.com/wLJMDmP.gif)

## Security

Because shinpuru is using cookies containing a singed JWT with session information to authenticate requests against the HTTP REST API, it was vulnerable to [XSRF (Cross-site request forgery) attacks](https://en.wikipedia.org/wiki/Cross-site_request_forgery). This is now fixed by generating session-bound anti-forgery tokens, which are set using the `XSRF-TOKEN` cookie, which is readable by JavaScript. Angular then reads the cookie and sets it as `X-XSRF-TOKEN` header for each following `POST`, `PUT` or `DELETE` request. API-Token based authentications do not need to send the `X-XSRF-TOKEN`, be cause they are already authenticated using headers.
- The `lock` command now has a process visualization for better clarity.

## Bug Fixes

- Permission rules bound to `@everyone` are now correctly processed.
- Also non-command specific permission rules are now correctly listed by the `GET /api/guilds/:guildID/:userID/permissions/allowed` endpoint.

## Backstage

- Refactored the [SQLite3 database middleware](https://github.com/zekroTJA/shinpuru/blob/master/internal/core/middleware/sqlite.go) so that it inherits all bindings from the MySQL middleware which redured it from 952 to only 161 lines of code.
- API handlers are now split up in seperate files for better overview.
- The `GetMemberPermissions` function is now moved from the database middlewares to the permission middleware.
- A critical flaw in the permissions middleware which would practically bypass the whole permission system is now fixed. [#169]

# Docker

[Here](https://hub.docker.com/r/zekro/shinpuru) you can find the docker hub page of shinpuru.

Pull the docker image of this release:
```
$ docker pull zekro/shinpuru:1.3.0
$ docker pull zekro/shinpuru:1.3.1
```
2 changes: 1 addition & 1 deletion bughunters.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ A list to honor all people who found some bugs, had some great ideas or contribu
| [Eli-Dev](https://github.com/Eli-Dev) | [#45](https://github.com/zekroTJA/shinpuru/issues/45), [#47](https://github.com/zekroTJA/shinpuru/issues/47), [#49](https://github.com/zekroTJA/shinpuru/issues/49) | | `3` |
| [Not-Nik](https://github.com/Not-Nik) | [#53](https://github.com/zekroTJA/shinpuru/issues/53) | [#56](https://github.com/zekroTJA/shinpuru/pull/56) | `3` |
| [InterXellar](https://github.com/InterXellar) | [#70](https://github.com/zekroTJA/shinpuru/issues/70), [#73](https://github.com/zekroTJA/shinpuru/issues/73), [#74](https://github.com/zekroTJA/shinpuru/issues/74) | | `3` |
| [SnowLeoo](https://github.com/SnowLeoo) | [#129](https://github.com/zekroTJA/shinpuru/issues/129), [#145](https://github.com/zekroTJA/shinpuru/issues/145) | | `2` |
| [SnowLeoo](https://github.com/SnowLeoo) | [#129](https://github.com/zekroTJA/shinpuru/issues/129), [#145](https://github.com/zekroTJA/shinpuru/issues/145), [#169](https://github.com/zekroTJA/shinpuru/issues/169) | | `3` |
| [Ron31](https://github.com/Ron31) | | [#32](https://github.com/zekroTJA/shinpuru/pull/32) | `2` |
| [Skillkiller](https://github.com/Skillkiller) | | [#79](https://github.com/zekroTJA/shinpuru/pull/79) | `2` |
| [nanderLP](https://github.com/nanderLP) | [#41](https://github.com/zekroTJA/shinpuru/issues/41) | | `1` |
Expand Down

0 comments on commit 865a5db

Please sign in to comment.