Commit graph

962 commits

Author SHA1 Message Date
rr-
a297489d97 docs/api: delete trailing commas 2018-03-22 09:38:09 +01:00
rr-
a3be5135ff docs/api: whitespace 2018-03-22 09:36:08 +01:00
rr-
0f8fc5efa8 imports 2018-03-22 09:27:31 +01:00
rr-
8f43c0db2d formatting 2018-03-22 09:19:45 +01:00
rr-
472f153960 formatting 2018-03-22 09:17:26 +01:00
rr-
a0ea1dc64a formatting 2018-03-22 09:15:46 +01:00
rr-
e678dcb872 move date to polyfill 2018-03-22 09:10:09 +01:00
rr-
5f835e9d55 wrap to 80 characters 2018-03-22 09:08:30 +01:00
rr-
2cfd635954 remove dead code 2018-03-22 09:06:53 +01:00
ReAnzu
2f857f00b2 server/api.md: Fix broken API docs 2018-03-21 20:52:48 -05:00
ReAnzu
70e81bdce9 server/user_token: enabled cannot be None, no need for exception 2018-03-11 09:34:57 -05:00
rr-
141abf15c9 docs: update typos and formatting 2018-03-11 08:22:37 +01:00
ReAnzu
12b751f066 server/user_token: empty notes after strip will be saved as nulls 2018-03-10 19:53:55 -06:00
ReAnzu
50efa71e0c Link to allow changing the note on the interface. 2018-03-10 19:46:06 -06:00
ReAnzu
a88ace403f Page formatting/style updates 2018-03-10 19:02:09 -06:00
ReAnzu
5ce8fab533 Implement last usage time 2018-03-10 18:15:00 -06:00
ReAnzu
8d8477ee6b client/user: Updating the title on the delete token button. 2018-03-10 16:38:55 -06:00
ReAnzu
e0d1d9a12e client/user: UI cleanup 2018-03-10 16:38:55 -06:00
ReAnzu
bc6d2dceb5 server/auth: updated typing on is_valid_token to agree with the implementation 2018-03-10 16:38:55 -06:00
ReAnzu
f19c82d110 Addressed defects
* Deleting the current token used for the session, now forces a logout.
* Removed an assert in the is_valid_token code that was erroneous.
* Sorted imports in test_auth according to style.
2018-03-10 16:38:55 -06:00
ReAnzu
053bd591a0 server/auth: fixed borked imports 2018-03-10 16:38:55 -06:00
ReAnzu
6f53ca92d9 client/user: Removed async/await code
* Moved user_token retrieval for display to the Promise.all pattern used elsewhere in the codebase.
2018-03-10 16:38:55 -06:00
ReAnzu
f532144a18 server/user_tokens: harden implementation
* Added additional testing around the expiration time and notes
* Forced rfc3339 datetime compliance for provided expiration_time values on user tokens
* Simplified the update method from expiration_time on user_tokens
* Updated API doc with correct field name for expirationTime
2018-03-10 16:38:55 -06:00
ReAnzu
3a582a2a99 Address code review comments 2018-03-10 16:38:55 -06:00
ReAnzu
22d9e584fa Address code review comments 2018-03-10 16:38:55 -06:00
ReAnzu
a900c54fe6 Address code review comments 2018-03-10 16:38:55 -06:00
ReAnzu
aa2963c0c6 Code and documentation cleanup 2018-03-10 16:38:55 -06:00
ReAnzu
fd9c224c06 Resolved timezone defect on python 3.5 2018-03-10 16:38:55 -06:00
ReAnzu
606ef31b01 Added note and expiration fields to the user_token model
* Updated UI to show more information about the token.
* Updated the js API to note the client token when creating it.
* Added prototype override to do add day calculations on dates.
* Updated auth check against token to inspect the expiration date of the token if it possesses one.
2018-03-10 16:38:55 -06:00
ReAnzu
87c9c27fba Address pull request comments
* Revised error messages
2018-03-10 16:38:55 -06:00
ReAnzu
8b320ff978 Address pull request comments
* Reformatted javascript
* Appeased pycodestyle
* TODO Add Expiration and Note fields to tokens?
2018-03-10 16:38:55 -06:00
ReAnzu
483c32cfbf User Token Authentication
* Users are only authenticated against their password on login, and to retrieve a token.
* Passwords are wiped from the app and cookies after login and token retrieval
* Tokens are revoked at the end of the session/logout
* If the user chooses the "remember me" option, the token is stored in the cookie
* A user interface to revoke tokens will be added
* Tokens correctly delete themselves on logout
* API documentation updated for the new user-token endpoints
* Added a Manage tokens tab to the user panel
* Added bullet point about the token authentication for the API
* Added tests for new endpoints and tests against authentication middleware
2018-03-10 16:38:55 -06:00
Michael Serajnik
a98ca55391 client/css: optimize help view margins 2018-03-10 17:45:37 +01:00
Michael Serajnik
db9132432b client/css: add default margins 2018-03-10 17:45:37 +01:00
Michael Serajnik
23a28ce69c client/css: make tab navigations scrollable on smaller screens 2018-03-10 17:45:37 +01:00
Michael Serajnik
a962bb351a client/css: refine mobile sidebar styling 2018-03-10 17:45:37 +01:00
Michael Serajnik
a08c7d65da client/css: add scrollbar styling 2018-03-10 17:45:37 +01:00
Michael Serajnik
7596f9042c client/css: remove margin on empty post container 2018-03-10 17:45:37 +01:00
Michael Serajnik
9b10d2bebf client/css: add default font sizes for headings 2018-03-10 17:45:37 +01:00
Michael Serajnik
e15dffa1dc client/css: change container paddings to be viewport size independent 2018-03-10 17:45:37 +01:00
Michael Serajnik
4ce29cf222 client/css: change font size declarations to em 2018-03-10 17:45:37 +01:00
Michael Serajnik
26a1451ff6 client/css: improve mobile styling 2018-03-10 17:45:37 +01:00
ReAnzu
c770ad8f28 client/posts: fix copy tags list of string values error #153 2018-03-09 07:53:54 +01:00
ReAnzu
3f52aceca4 server/users: harden password hashes
- Changed password setup to use libsodium and argon2id (regular SHA256
  hashing for passwords is inadequate as modern GPU's can hash generate
  billions of hashes per second).
- Added code to auto migrate old passwords to the new password_hash if
  the existing password_hash matches either of the legacy password
  generation schemes (SHA1 or SHA256).
- Added migration to support new password_hash format length
- Added column password_revision. This field will default to 0, which
  all passwords will have till they're updated. After that each password
  hash method has a revision.
2018-03-08 23:40:47 +01:00
ReAnzu
7519e071e7 server/posts: deleting a post purges its artifacts
Specifically, its thumbnail and post source.
2018-03-08 23:37:37 +01:00
ReAnzu
12ec43f098 server/posts: auto convert GIFs to WEBMs/MP4s
- Default setting is false for both conversions, as this will require
  additional resources of the server, but is bandwidth friendly for
  viewers
- WEBM conversion is slow, but better quality than MP4 conversion with
  a typically smaller file size
- Tags are copied over from the original upload
- Snapshots are generated for the new auto posts
2018-03-08 07:48:45 +01:00
ReAnzu
4ff8be6a2f server/posts: ignore ffmpeg warnings
Poorly formatted MP4 and WEBM sources can cause ffmpeg to throw a lot
of warnings. However when there is byte ouptut, the generated thumbnail
is valid. Add a bypass for the resize_fill function to allow ffmpeg to
error.
2018-03-08 07:48:44 +01:00
ReAnzu
4b3529272e server/users: let administrators add new users
* Added functionality for administrators to directly add users to the
  application
* Added permission users:create:any to handle level that users are
  allowed to create other users
* Moved old permission users:create to users:create:self
2018-03-07 21:30:24 +01:00
rr-
a1fbeb91a0 server/users: fix checking passwords with colons 2018-02-10 14:04:02 +01:00
rr-
59d8b0d4c5 client: update dependencies 2018-01-06 21:35:53 +01:00