Merge branch 'develop'

jschan
Thomas Lynch 2 years ago
commit 6b99f8e6e4
Signed by: fatchan
GPG Key ID: 112884AA57DF40B1
  1. 5
      CHANGELOG.md
  2. 1
      README.md
  3. 4
      lib/captcha/getdistorts.js
  4. 3
      lib/middleware/file/filemiddlewares.js
  5. 24
      package-lock.json

@ -1,3 +1,8 @@
### 0.7.2
- Add playlist generating bookmarklet script to README
- Bugfix some captcha generations causing server error due to bad random number range.
- Fix UTF8-filenames not being decoded corectly (busboy made this not the default in a recent update).
### 0.7.1
- Show sticky level on hover (title property) of pin icon.
- Reduce frontend script size by ~10KB. More improvement to come in future updates.

@ -36,6 +36,7 @@ Interested in contributing to jschan development? See [CONTRIBUTING.md](CONTRIBU
## Related Projects
Here are some other projects related to jschan that you might find useful. Unless explicitly specified here, they are not officially endorsed or otherwise guaranteed to work or be safe and should be used at your own risk.
- [myumyu/globalafk](https://gitgud.io/myumyu/globalafk/) - "A simple python script that sends ugly notifications when something happens on a jschan imageboard that you moderate."
- [ussaohelcim/ptchina-playlist](https://github.com/ussaohelcim/ptchina-playlist) - A bookmarklet script that will take all mp3, mp4 and webm files from a thread and download them as an m3u playlist that you can play in an external media player.
## For generous people

@ -21,8 +21,8 @@ module.exports = async (width, height, numDistorts, distortion) => {
, originy = await randomRange(0, height);
//destionation coordinate for distortion point
const destx = await randomRange(Math.max(distortion, originx - distortion), Math.min(width - distortion, originx + distortion))
, desty = await randomRange(Math.max(distortion, originy - (distortion * 2)), Math.min(height - distortion, originy + (distortion * 2)));
const destx = await randomRange(Math.max(distortion, originx - distortion), Math.min(width - distortion, originx + distortion)+1)
, desty = await randomRange(Math.max(distortion, originy - (distortion * 2)), Math.min(height - distortion, originy + (distortion * 2))+1);
distorts.push([
{x:originx,y:originy},

@ -20,7 +20,7 @@ const { debugLogs } = require(__dirname+'/../../../configs/secrets.js')
});
}
, updateHandlers = () => {
const { globalLimits, filterFileNames, spaceFileNameReplacement } = require(__dirname+'/../../misc/config.js').get;
const { globalLimits, filterFileNames, spaceFileNameReplacement } = require(__dirname+'/../../misc/config.js').get;
['flag', 'banner', 'asset', 'post'].forEach(fileType => {
const fileSizeLimit = globalLimits[`${fileType}FilesSize`];
const fileNumLimit = globalLimits[`${fileType}Files`];
@ -34,6 +34,7 @@ const { debugLogs } = require(__dirname+'/../../../configs/secrets.js')
});
};
fileHandlers[fileType] = upload({
defParamCharset: 'utf8',
debug: debugLogs,
createParentPath: true,
safeFileNames: filterFileNames,

24
package-lock.json generated

@ -3143,7 +3143,7 @@
"node_modules/chokidar/node_modules/glob-parent": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz",
"integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=",
"integrity": "sha512-E8Ak/2+dZY6fnzlR7+ueWvhsH1SjHr4jjss4YS/h4py44jY9MhK/VFdaZJAWDz6BbL21KeteKxFSFpq8OS5gVA==",
"dependencies": {
"is-glob": "^3.1.0",
"path-dirname": "^1.0.0"
@ -5944,7 +5944,7 @@
"node_modules/glob-stream": {
"version": "6.1.0",
"resolved": "https://registry.npmjs.org/glob-stream/-/glob-stream-6.1.0.tgz",
"integrity": "sha1-cEXJlBOz65SIjYOrRtC0BMx73eQ=",
"integrity": "sha512-uMbLGAP3S2aDOHUDfdoYcdIePUCfysbAd0IAoWVZbeGU/oNQ8asHVSshLDJUPWxfzj8zsCG7/XeHPHTtow0nsw==",
"dependencies": {
"extend": "^3.0.0",
"glob": "^7.1.1",
@ -5964,7 +5964,7 @@
"node_modules/glob-stream/node_modules/glob-parent": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz",
"integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=",
"integrity": "sha512-E8Ak/2+dZY6fnzlR7+ueWvhsH1SjHr4jjss4YS/h4py44jY9MhK/VFdaZJAWDz6BbL21KeteKxFSFpq8OS5gVA==",
"dependencies": {
"is-glob": "^3.1.0",
"path-dirname": "^1.0.0"
@ -8084,9 +8084,9 @@
}
},
"node_modules/jpeg-js": {
"version": "0.4.3",
"resolved": "https://registry.npmjs.org/jpeg-js/-/jpeg-js-0.4.3.tgz",
"integrity": "sha512-ru1HWKek8octvUHFHvE5ZzQ1yAsJmIvRdGWvSoKV52XKyuyYA437QWDttXT8eZXDSbuMpHlLzPDZUPd6idIz+Q=="
"version": "0.4.4",
"resolved": "https://registry.npmjs.org/jpeg-js/-/jpeg-js-0.4.4.tgz",
"integrity": "sha512-WZzeDOEtTOBK4Mdsar0IqEU5sMr3vSV2RqkAIzUEV2BHnUfKGyswWFPFwK5EeDo93K3FohSHbLAjj0s1Wzd+dg=="
},
"node_modules/js-git": {
"version": "0.7.8",
@ -16587,7 +16587,7 @@
"glob-parent": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz",
"integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=",
"integrity": "sha512-E8Ak/2+dZY6fnzlR7+ueWvhsH1SjHr4jjss4YS/h4py44jY9MhK/VFdaZJAWDz6BbL21KeteKxFSFpq8OS5gVA==",
"requires": {
"is-glob": "^3.1.0",
"path-dirname": "^1.0.0"
@ -18771,7 +18771,7 @@
"glob-stream": {
"version": "6.1.0",
"resolved": "https://registry.npmjs.org/glob-stream/-/glob-stream-6.1.0.tgz",
"integrity": "sha1-cEXJlBOz65SIjYOrRtC0BMx73eQ=",
"integrity": "sha512-uMbLGAP3S2aDOHUDfdoYcdIePUCfysbAd0IAoWVZbeGU/oNQ8asHVSshLDJUPWxfzj8zsCG7/XeHPHTtow0nsw==",
"requires": {
"extend": "^3.0.0",
"glob": "^7.1.1",
@ -18788,7 +18788,7 @@
"glob-parent": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz",
"integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=",
"integrity": "sha512-E8Ak/2+dZY6fnzlR7+ueWvhsH1SjHr4jjss4YS/h4py44jY9MhK/VFdaZJAWDz6BbL21KeteKxFSFpq8OS5gVA==",
"requires": {
"is-glob": "^3.1.0",
"path-dirname": "^1.0.0"
@ -20392,9 +20392,9 @@
}
},
"jpeg-js": {
"version": "0.4.3",
"resolved": "https://registry.npmjs.org/jpeg-js/-/jpeg-js-0.4.3.tgz",
"integrity": "sha512-ru1HWKek8octvUHFHvE5ZzQ1yAsJmIvRdGWvSoKV52XKyuyYA437QWDttXT8eZXDSbuMpHlLzPDZUPd6idIz+Q=="
"version": "0.4.4",
"resolved": "https://registry.npmjs.org/jpeg-js/-/jpeg-js-0.4.4.tgz",
"integrity": "sha512-WZzeDOEtTOBK4Mdsar0IqEU5sMr3vSV2RqkAIzUEV2BHnUfKGyswWFPFwK5EeDo93K3FohSHbLAjj0s1Wzd+dg=="
},
"js-git": {
"version": "0.7.8",

Loading…
Cancel
Save