Commit Graph

70 Commits

Author SHA1 Message Date
Barış Soner Uşaklı
21fb8590e5 test: remove old comment 2023-04-23 18:59:18 -04:00
Veronikya
c931183287 fix: NodeBB#11482 thumbs Post Can not upload a thumbnail, only multip… (#11483)
* fix: NodeBB#11482 thumbs Post Can not upload a thumbnail, only multiple uploads

* Modify upload thumbnail test

* Modify upload thumbnail test +,

* Get rid of v2 uploads test

* edit times

* Modify amount of files associated post test

* edit post file amount
2023-04-15 17:56:36 -04:00
Barış Soner Uşaklı
c039a699bd sharp test fix 2022-09-13 12:36:13 -04:00
Julian Lam
c07d595662 Update to lru-cache@^7 (#10815)
* chore(deps): bump lru-cache from 6.0.0 to 7.13.1 in /install

Bumps [lru-cache](https://github.com/isaacs/node-lru-cache) from 6.0.0 to 7.13.1.
- [Release notes](https://github.com/isaacs/node-lru-cache/releases)
- [Changelog](https://github.com/isaacs/node-lru-cache/blob/main/CHANGELOG.md)
- [Commits](https://github.com/isaacs/node-lru-cache/compare/v6.0.0...v7.13.1)

---
updated-dependencies:
- dependency-name: lru-cache
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* fix(lru-cache): remove unneeded `length` params for cache creation, as `maxSize` was not used in those init calls, also renamed some methods to match new method names in lru-cache [breaking]

Added deprecation notices for old params

* fix: replace three direct calls to lru-cache with call to cacheCreate, moved cache creation call in uploads to run on first init as config is not populated at lib init

* test: move configs init above cache reset calls in databasemock

* move some more code above cache clear

* refactor: remove unused

* test: lru

* test: more debug

* test: on more test

* use await helpers.uploadFile

* fix: tests remove logs

* fix: acp cache page

* fix: add in one more guard again cache instantiation with `length` prop but no `maxSize` prop

* fix(deps): bump markdown

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Barış Soner Uşaklı <barisusakli@gmail.com>
2022-08-10 13:24:16 -04:00
Julian Lam
22368b996e refactor: move orphan cleaning logic to its own method, added tests for getOrphans and cleanOrphans 2022-06-15 15:22:51 -04:00
Barış Soner Uşaklı
424db9ff37 fix: upload test for latest sharp 2022-04-19 13:17:03 -04:00
Julian Lam
b9edee143e fix: local deleteUploads() method in src/user/delete.js to call User.deleteUpload() 2022-02-14 15:02:07 -05:00
Barış Soner Uşaklı
fa1ac04dc6 lint: fix 2021-11-22 19:26:18 -05:00
Barış Soner Uşaklı
c5f08fdc81 breaking: remove socket.io/flags.js
refactor: helpers.loginUser returns a single object {jar, csrf_token}
2021-11-22 19:23:51 -05:00
Barış Soner Uşaklı
fb363957d1 refactor: tab rules 2021-11-18 16:42:18 -05:00
Peter Jaszkowiak
ff84d6c52f Add more chat hooks, replace toobig.jpg (#9843)
* feat: more hooks for messaging

for use in global chat plugin

* fix: replace toobig.jpg

toobig.png is a real 10000x10000 image
2021-09-27 13:22:12 -04:00
gasoved
3df79683f5 feat: create folders in ACP uploads #9638 (#9750)
* feat: create folders in ACP uploads #9638

* fix: openapi

* test: missing tests

* fix: eslint

* fix: tests
2021-08-31 09:27:00 -04:00
Barış Soner Uşaklı
435067aa5f test: remove logs 2021-04-18 21:57:07 -04:00
Barış Soner Uşaklı
2ea468daa3 test: clear cache between runs, require middleware later in helpers 2021-04-18 21:57:07 -04:00
Barış Soner Uşaklı
2f401d7d74 test: test times 2021-04-18 21:57:07 -04:00
psychobunny
4dd3844680 fix: logic is hard 2021-04-18 21:57:07 -04:00
psychobunny
bc0ca61c6a fix: run in series 2021-04-18 21:57:07 -04:00
Barış Soner Uşaklı
80ef108220 test: log 2021-04-18 21:57:07 -04:00
psychobunny
13fa983e61 fix: accidentally committed this 2021-04-18 21:57:07 -04:00
psychobunny
eb240c905f fix: tests 2021-04-18 21:57:07 -04:00
psychobunny
ea22cd302a fix: use req.ip instead, since guests can upload as well 2021-04-18 21:57:07 -04:00
psychobunny
a9978fcfd2 feat: rate limit file uploads 2021-04-18 21:57:07 -04:00
Barış Soner Uşaklı
f7f46e7c65 feat: upgrade sharp (#9442) 2021-03-29 21:00:12 -04:00
Peter Jaszkowiak
cc9d6fd08b chore: eslint max-len 2021-02-08 18:06:44 -05:00
Peter Jaszkowiak
dab3b23575 chore: eslint no-var, vars-on-top 2021-02-08 18:06:44 -05:00
Peter Jaszkowiak
b56d9e12b5 chore: eslint prefer-arrow-callback 2021-02-08 18:06:44 -05:00
Peter Jaszkowiak
707b55b6a5 chore: eslint prefer-template 2021-02-08 18:06:44 -05:00
Julian Lam
5ec3b3d083 fix: tests 2020-12-09 10:42:41 -05:00
Barış Soner Uşaklı
5f10d67db5 Remove sounds (#8617)
* feat: remove sounds

* feat: remove more sounds

* feat: disable sounds plugin

* fix: openapi
2020-09-06 23:45:00 -04:00
Barış Soner Uşaklı
2cdb935f1d feat: remove file.isFileTypeAllowed 2020-07-24 11:21:26 -04:00
Barış Soner Uşaklı
48b41debe6 fix: vulnerability in cover and admin uploads (#8419)
* fix: vulnerability in cover and admin uploads

* fix: remove old test

* fix: update tests
2020-06-22 12:08:35 -04:00
Barış Soner Uşaklı
ec5582b53c feat: add privilege give/rescind hooks (#8336)
* feat: add privilege give/rescind hooks

action:privileges.categories.give/rescind
action:privileges.global.give/rescind

breaking change, privileges.categories.give/rescind and privileges.global.give/rescind use full privilege name for groups ie `groups:find` instead of `find`

* fix: tests, privileges renamed
2020-05-26 21:57:38 -04:00
Julian Lam
6f504c4142 Remove allowFileUploads ACP option (#8324)
* feat: allow awaitable upgrade scripts

* feat: allowFileUploads removal upgrade script

* refactor: remove unnecessary ACP option `allowFileUploads`

* fix: updated upgrade script template to not use callback arg

* fix: upgrade script as per @baris

* fix: add missing await

* fix: add missing await
2020-05-21 16:06:35 -04:00
Julian Lam
6edf02d4a5 fix: remove upload picture test (avatars) 2020-04-23 19:57:41 -04:00
Barış Soner Uşaklı
8c6a7954cf fix: delete upload 2020-01-19 14:57:06 -05:00
Barış Soner Uşaklı
ffe3670ff5 feat: deprecate file.isFileTypeAllowed
use image.isFileTypeAllowed, this function was always meant for images
2019-09-29 19:53:03 -04:00
Barış Soner Uşaklı
96ab8d05aa fix: only allow png/jpg/bmp in cover/profile images 2019-09-21 23:10:49 -04:00
renovate[bot]
8a64667ff8 fix(deps): update dependency sharp to v0.21.3 (#7267)
* fix(deps): update dependency sharp to v0.21.3

* fix: tests for new sharp version errors
2019-01-19 12:44:14 -05:00
Barış Soner Uşaklı
1f918ca8f8 Home route (#7039)
* fix: WIP home fix

* remove console.log

* fix: #6949

on redis run all tests in subfolder /forum
fix URI errors
fix sping/ping
2018-11-30 21:35:57 -05:00
Barış Soner Uşaklı
9c03881d5a add threshold for image resizing 2018-10-24 20:03:03 -04:00
Barış Soner Uşaklı
1bea247748 add username/email to user-delete event 2018-10-04 11:08:01 -04:00
Barış Soner Uşaklı
59b988a205 change test so it checks url 2018-09-20 22:09:20 -04:00
Barış Soner Uşaklı
b7ead6dc9c Replace jimp with sharp (#6774)
* add probe image size and max image size

* replace jimp and image-probe with sharp

* better name for test

* resize with just path

* resize thumb inplace

* use filename
2018-09-20 17:05:52 -04:00
Barış Soner Uşaklı
229e49cf8f closes #6523, closes #6524 2018-05-26 12:49:29 -04:00
Barış Soner Uşaklı
04979f86a8 delete users uploads on account delete
store uid:<uid>:uploads
2018-04-06 15:16:28 -04:00
Baris Usakli
9b78b95c47 fix tests 2018-02-26 16:27:02 -05:00
Barış Soner Uşaklı
ff6c6a54c1 make upload permissions global
give upload image permission to registered users on install
add global privileges to app.user.privileges for client side use
2018-01-03 13:27:34 -05:00
Barış Soner Uşaklı
18f4f27fe0 closes #6024 2017-10-31 18:03:54 -04:00
Barış Soner Uşaklı
5d45f9fff2 fix lint 2017-10-23 19:09:44 -04:00
Barış Soner Uşaklı
6a2019c646 closes #6003 2017-10-23 19:05:00 -04:00