Commit Graph

234 Commits

Author SHA1 Message Date
Shyam Sunder c5358f7f83 client+server: add post pools feature 2020-06-04 21:01:28 -04:00
Shyam Sunder ea675d20cb server/docker: fix missing installation requirements
Furthermore, an update to Pillow has improved the floating-point
precision of the image hash algorithm, requiring minor updates to
the respective unit tests.

See https://github.com/python-pillow/Pillow/pull/4320
2020-06-04 16:38:26 -04:00
Shyam Sunder b0f1b8c230 fix python lint issues 2020-06-03 11:55:50 -04:00
Ruin0x11 7bcefeb347 Add pool information to API.md 2020-05-04 19:45:09 -07:00
Ruin0x11 5ca21f9e7f Add pool tests 2020-05-04 19:12:54 -07:00
Shyam Sunder 377fe52072 server/posts/upload: refactor youtube-dl caller code to fix some bugs 2020-04-07 15:14:53 -04:00
Shyam Sunder cd6683c2d8 server/posts/upload: make youtube-dl use best format
Fixes #313
2020-04-05 15:21:03 -04:00
Shyam Sunder 2c6434b08d server/posts/upload: limit filesize for uploads through youtube-dl
This will be controlled by the config parameter 'max_dl_filesize'.

TODO: In a future commit, the regular downloader should also respect
this parameter.
2020-04-03 15:32:25 -04:00
Shyam Sunder 99a69333e6 server/posts/upload: Add youtube-dl functionality
allows for video-based posts to be created by using youtube-dl
on the server. Access is controlled with the 'uploads:use_downloader'
permission.
2020-04-03 13:11:54 -04:00
Shyam Sunder bd9284b7f8 server/tests: update unit tests for elasticsearch removal 2020-03-13 22:45:11 -04:00
Shyam Sunder 0e6427d8bc server/tests: use postgresql test database 2020-03-06 18:15:25 -05:00
Shyam Sunder 978a384d9e server/tag-categories: order tag categories alphabetically when requested 2020-01-12 12:18:53 -05:00
neobooru 73c53fa4e2 all: add support for webp images
Includes webp test image
Merges #283
2019-10-08 18:22:47 -04:00
Shyam Sunder 0c05330cfc server/tests: fix failing tests 2019-09-28 18:58:45 -04:00
Shyam Sunder 1231469a35 server/tests: integrate testing into Docker 2019-09-28 18:58:45 -04:00
rr- b1a20a7134 tests: fix failing tests
Regression caused by changing the way images are converted to grayscale
in 9730aa5c
2018-07-25 19:53:37 +02:00
rr- c9cb9aa539 server/password-reset: try to construct full URL 2018-07-08 10:10:06 +02:00
rr- d85e746a65 server/tests: fix failing info api tests 2018-07-08 09:42:13 +02:00
ReAnzu 2a69f0193f server/auth: add token authentication
* Users are only authenticated against their password on login,
  and to retrieve a token
* Passwords are wiped from the GUI frontend 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
* Tokens correctly delete themselves on logout
* Tokens can expire at user-specified date
* Tokens have their last usage time
* Tokens can have user defined descriptions
* Users can manage login tokens in their account settings
2018-03-25 22:23:29 +02: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 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- 1c4c5c5f91 remove tags.json 2017-10-01 21:48:00 +02:00
rr- 674d6c35d7 server/posts: add posts:view:featured privilege 2017-08-24 17:17:09 +02:00
rr- 4afece8d50 server/posts: add non-guessable IDs to post URLs 2017-08-24 17:17:09 +02:00
rr- 4bc58a3c95 server: lint 2017-04-24 23:30:53 +02:00
rr- 8e5798ab8c server/tests: fix content sync tests on postgres 2017-04-24 22:36:41 +02:00
rr- e4aa38f159 server/search: fix errors on negative page offsets 2017-04-24 22:12:12 +02:00
rr- ba4df16499 server/search: add search term escaping 2017-04-24 21:59:38 +02:00
rr- 5681fd11ef server/net: make the user-agent configurable
Fixes #127
2017-03-03 17:27:23 +01:00
rr- fdad08e176 server: use index-based paging (#123) 2017-02-09 22:40:00 +01:00
rr- ee6b66329b server/posts: fix search by aspect ratio
It was being rounded to nearest integer because of the width/height
columns' data type.
2017-02-05 23:21:43 +01:00
rr- 00c3a4320b server/posts: support aspect-ratio search query 2017-02-05 22:09:33 +01:00
rr- 0b21d98c9b server/posts: support note-text search query 2017-02-05 21:51:53 +01:00
rr- ad842ee8a5 server: refactor + add type hinting
- Added type hinting (for now, 3.5-compatible)
- Split `db` namespace into `db` module and `model` namespace
- Changed elastic search to be created lazily for each operation
- Changed to class based approach in entity serialization to allow
  stronger typing
- Removed `required` argument from `context.get_*` family of functions;
  now it's implied if `default` argument is omitted
- Changed `unalias_dict` implementation to use less magic inputs
2017-02-05 16:34:45 +01:00
rr- abf1fc2b2d server: make linters happier 2017-02-03 22:42:14 +01:00
rr- fd30675124 server/image-hash: do not depend on image-match
While I hold this library in great esteem for its excellent work on
implementing the original paper, I have several problems with it:

- as of this commit, it (again) has bug fixes unreleased on pip
- its code is badly structured
    - forces OOP and then proceeds @staticmethod everything
    - bad class design, parameters are repeated in several places
    - terrible contract of make_record() and generate_signature()
    - ambiguous parameters: path vs. image path vs. image content
    - doesn't adhere to PEP-8
- depends on cairo just to render svg images almost no one uses this
  library with
2017-02-03 21:20:52 +01:00
rr- 894cd29511 server/tests: test image hash 2017-02-03 19:53:10 +01:00
rr- e92bd2fd80 server/tags: fix getting default category name
No categories? Should have thrown an error rather than returning None.
2017-02-02 20:04:09 +01:00
rr- 9edaaffec2 server/posts: fix post relations
Trying to relate post to itself resulted in 500 ISE.
2017-01-03 21:37:38 +01:00
rr- 1a59a74d63 server/image-hash: add image search engine 2016-12-26 15:00:16 +01:00
rr- 141c9fcdc9 server/tags: merge also tag relations 2016-10-22 18:02:50 +02:00
rr- 995cd4610d server: drop old style class declarations 2016-10-22 14:43:52 +02:00
rr- e71718c50d server/posts: add replaceContent to post merging 2016-10-21 22:34:45 +02:00
rr- 9d6a0e0173 server/posts: add post merging 2016-10-21 21:48:38 +02:00
rr- b853caf6f5 server/posts: fix relation updating
Fixes #103
2016-10-02 17:21:15 +02:00
rr- 0c61e85340 server: fix lint 2016-09-26 22:51:00 +02:00
rr- 560a7d6839 server/search: prefer arrays over ranges
(No, it doesn't work recursively.)
Also fix tests.
2016-09-26 22:48:09 +02:00
rr- 8674c8b50e server/posts: report duplicate post ID and URL 2016-09-10 10:16:14 +02:00
rr- c516030c66 server/tests: fix info api tests 2016-09-10 10:12:43 +02:00