Commit Graph

511 Commits

Author SHA1 Message Date
Shyam Sunder
c5358f7f83 client+server: add post pools feature 2020-06-04 21:01:28 -04:00
Shyam Sunder
48c9001194 server/docker: include setuptools in installation 2020-06-04 18:51:30 -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
1be947e946 PR fixes 2020-06-02 17:43:18 -07: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
Ruin0x11
6b8e3f251f Implement pool merging 2020-05-04 15:15:51 -07:00
Ruin0x11
8795279a73 Add pool input box in post details 2020-05-04 02:20:23 -07:00
Ruin0x11
e6bf102bc0 Add list of posts to pools 2020-05-04 00:09:33 -07:00
Ruin0x11
d59ecb8e23 Add pool CRUD operations/pages 2020-05-03 19:53:28 -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
65202189e1 server/posts/upload: edit default flag behavior
The 'loop' flag will be auto-selected by default on video posts if
the flags parameter is undefined when creating a new post.
2020-03-21 18:25:54 -04:00
neobooru
c60ec22b92 server/func/tags: allow tags to have longer names 2020-03-15 22:25:45 +01:00
Shyam Sunder
db0c33bb14 server/func/image_hash: added docstrings to functions 2020-03-13 22:45:11 -04:00
Shyam Sunder
1a8de9ef3a all: purge remaining elasticsearch artifacts 2020-03-13 22:45:11 -04:00
Shyam Sunder
6cc2a91632 server/image_search: add migrations for elasticsearch removal 2020-03-13 22:45:11 -04:00
Shyam Sunder
bd9284b7f8 server/tests: update unit tests for elasticsearch removal 2020-03-13 22:45:11 -04:00
Shyam Sunder
4c78cf8c47 server/image_search: implement reverse search functionality in postgres
This will remove the dependency on the Elasticsearch database.

The search query is passed currently as raw SQL. Proper implementation
using SQLAlchemy will need custom ORM classed to be made.

Additional config parameter "allow_broken_uploads" has been added.
2020-03-13 22:45:11 -04:00
Shyam Sunder
a616cf6987 server/migrations: implement database connection timeout 2020-03-13 22:43:31 -04:00
Shyam Sunder
e3401b3993 server/config: gracefully handle bad config files 2020-03-13 13:17:41 -04:00
Shyam Sunder
0e6427d8bc server/tests: use postgresql test database 2020-03-06 18:15:25 -05:00
Shyam Sunder
f1a09c21d4 server/func/tag_categories: fixed deprecated SA function call 2020-03-06 10:29:03 -05:00
CorePoint
72e104b145
detect ftypiso5 as mp4 mime type 2020-02-07 12:10:38 +01:00
Shyam Sunder
0ff9f9d5a2 server/func/posts: explicity specify MD5 for post security hash 2020-01-12 12:54:28 -05:00
Shyam Sunder
dce7136f15 server/docker: update renamed dependency pyrfc3339 2020-01-12 12:29:25 -05:00
Shyam Sunder
978a384d9e server/tag-categories: order tag categories alphabetically when requested 2020-01-12 12:18:53 -05:00
Shyam Sunder
4f5ea9c5ed server/facade: bump elasticsearch timeout to 2 minutes
Fixes #285
2019-10-15 13:02:24 -04: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
9c04400369 docker: added OCI-compatible image labels
See https://github.com/opencontainers/image-spec/blob/master/annotations.md
2019-10-04 19:52:57 -04:00
neobooru
d2a4e50669 server/info: report correct size when filesystem is missing files
Merges PR #279
2019-09-29 23:07:53 -04:00
Shyam Sunder
4fe9c5f4ca server/docker: use Alpine-based image for space savings 2019-09-29 19:22:43 -04:00
Shyam Sunder
2af304b844 docker: add hooks to autotag images 2019-09-28 19:28:17 -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
Shyam Sunder
edf9083552 server/docker: improved Dockerfile 2019-09-27 23:15:34 -04:00
Shyam Sunder
dd56c287b5 server/facade: integrated elasticsearch wait into entrypoint 2019-09-21 14:22:07 -04:00
Shyam Sunder
54eab0aa35 server/image-hash: optionally allow for elasticsearch authentication 2019-09-15 16:50:47 -04:00
Shyam Sunder
734e28e014 server/tools: better documentation for file rename admin script 2019-09-04 17:58:26 -04:00
Shyam Sunder
369ddaf2f8 server/tools: add tool to change post filenames due to changed secret 2019-09-03 14:35:57 -04:00
Shyam Sunder
83442b4977 server/tools: created simple admin command script 2019-08-15 21:53:57 -04:00
Shyam Sunder
9b02a0bd5e server/posts: allow for longer source URLs
Fixes #272
2019-07-27 19:24:39 -04:00
Shyam Sunder
979d8409d5 server/tools: add password reset script 2019-07-27 17:36:15 -04:00
Shyam Sunder
7a42c7a69b server/tools: add script to check audio flags for posts 2019-07-27 16:32:39 -04:00
Shyam Sunder
9329717335 server/docker: Rewrite how files are copied in Docker
This is in preperation of a future commit that will perform
the unit tests in a docker container
2019-07-27 14:34:58 -04:00
Shyam Sunder
9a9a475037 server/facade: Check mailer config on startup 2019-07-22 20:26:16 -04:00
neobooru
80d272d60b server/config: Add 'domain' and 'smtp from' config entries
Fixes #193 and #256

This however requires users to manually set the domain in the config.yaml.
This field currently is optional, but it would probably be better to make it required and not fall back to HTTP_ORIGIN and HTTP_REFERER, which might be inaccurate or not set (especially behind reverse proxies and the like)

server/config: Leave domain empty by default

Co-Authored-By: Shyam Sunder <sgsunder1@gmail.com>
2019-07-22 20:26:09 -04:00
Shyam Sunder
26127eaaf5 server/config: use safer YAML loader
Fixes #254
2019-04-27 18:08:47 -04:00
Shyam Sunder
4117f63375 server/model/posts: Make post flags a hybrid attribute in model
This should (hopefully) fix #250 and #252
2019-04-22 20:20:19 -04:00
Hunternif
9e7c77cd73 server/build: require elasticsearch >=5.0.0., <7.0.0. 2019-04-17 23:15:01 +07:00
Shyam Sunder
d69ef710b3 server/search: automatically add wildcards for source URL searching 2019-04-07 19:30:35 +02:00
Shyam Sunder
1d8cfd5a89 server/search: allow searching by source URL content 2019-04-07 19:30:35 +02:00
Shyam Sunder
b18acf3982 server/func/images: attempt to fix #225 2019-02-11 21:28:02 +01:00
Shyam Sunder
065a466af8 server/func/posts: fix #221 2019-02-11 21:28:02 +01:00
rr-
5ed70b2ec4 server/func/images: work around ffmpeg bug 6375 2019-01-09 21:15:58 +01:00
Shyam Sunder
14377933a7 server/func/posts: transfer flags on merge 2018-12-22 12:31:25 +01:00
Shyam Sunder
e80c482891 server/func/images: Fix Unicode Error 2018-12-22 12:31:25 +01:00
rr-
d3cabc4a36 server: handle empty flags in migration 2018-09-24 11:40:11 +02:00
Shyam Sunder
8a10fc8ffd server/posts: automatically detect sound in video post uploads 2018-09-24 11:36:13 +02:00
Shyam Sunder
3879c2ec20 server/search: allow searching by post flags 2018-09-24 11:36:13 +02:00
Shyam Sunder
2235a72d2f server+client: added sound flag to video posts 2018-09-24 11:36:13 +02:00
Shyam Sunder
cbf67587e2 client: Some minor fixups to base URL feature
* Cleanup cookie storage path
* Cleanup Data URL
2018-08-23 21:04:19 +02:00
rr-
45b6df020a build: fix paths to config files 2018-08-04 13:19:02 +02:00
rr-
8da22cbd5e server: fix paths to config 2018-08-03 21:04:23 +02: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
Shyam Sunder
6a6c4dc822 build: add Docker functionality and documentation 2018-07-25 13:39:57 +02:00
Shyam Sunder
9730aa5c05 client: clean up required Python packages
* Packages that are only used in testing or development
have been moved to `dev-requirements.txt`
* Closes #178
* Minor rewrite to drop the `scikit-image` package, which
saves around 200MB in install size
2018-07-22 14:02:30 +02:00
rr-
1fe22a4d0a server/tag-categories: disallow uppercase colors 2018-07-08 10:10:06 +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
rr-
b6a5be74cf config: fix camelCase 2018-07-08 09:38:41 +02:00
Shyam Sunder
60ab9246c6 client: improved build.js, use relative links
* Removed unnecessary require('config.js') calls
* 'markdown.js' now uses rel. links in EntityPermalinkWrapper
* 'password_reset.py' now generates rel. links
* Removed 'Base URL' config parameter
* Removed 'API URL' config parameter
* 'build.js' no longer reads/requires config.yaml
* Updated documentation
* Removed unnecessary node packages used in 'build.js'

abandon api_url parameter
2018-07-06 19:40:20 +02:00
Shyam Sunder
3972b902d8 client: fetch configurations from server at runtime
Permissions, regex filters, app title, email info,
and safety now fetched using server's Info API
2018-06-27 21:20:03 +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
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-
f8c7375b01 server/tags: allow uppercase tag category colors
i.e. colors such as "#FF0000"
2017-10-08 21:38:38 +02: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-
3c138685ea server/images: handle resizing errors 2017-05-03 12:10:04 +02:00
rr-
a1b762c65f api: fix getting cached disk usage with empty dirs 2017-05-01 20:26:53 +02:00
rr-
4bc58a3c95 server: lint 2017-04-24 23:30:53 +02:00
rr-
467b4a7630 server/tags: fix nondeterministic siblings order 2017-04-24 22:48:11 +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-
9814b132c3 server/search: fix searching for ---
Allow only one negation sign.
Also throw an error if user searches only for "-".
2017-04-24 19:55:02 +02:00
rr-
0014721053 server/tags: fix retrieving many tags 2017-04-19 14:44:54 +02:00
rr-
7044d2aaee server/posts: ignore old elasticsearch results 2017-03-12 18:30:42 +01: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
Alice Ryhl
a3b3532ca4 server/api: patch timing attack on password reset form 2017-02-07 20:29:37 +01:00