Commit Graph

705 Commits

Author SHA1 Message Date
Yukai Huang c26a9f10ca
Fix missing environment config for version check
Signed-off-by: Yukai Huang <yukaihuangtw@gmail.com>
2020-02-07 10:55:16 +08:00
Yukai Huang caf4ac61e5
Support emojify.css use cdn
Signed-off-by: Yukai Huang <yukaihuangtw@gmail.com>
2020-02-06 14:31:25 +08:00
Yukai Huang 821295ecd3
Fix linting errors
Signed-off-by: Yukai Huang <yukaihuangtw@gmail.com>
2020-02-06 10:46:48 +08:00
Yukai Huang 8cd9ba2f82 Log version check info when app is starting
Signed-off-by: Yukai Huang <yukaihuangtw@gmail.com>
2020-02-06 10:40:54 +08:00
Yukai Huang 334c81efe7 Save version info in app locals
Signed-off-by: Yukai Huang <yukaihuangtw@gmail.com>
2020-02-06 10:19:44 +08:00
Yukai Huang 11265238db Implement version check middleware
Signed-off-by: Yukai Huang <yukaihuangtw@gmail.com>
2020-02-06 10:19:44 +08:00
Yukai Huang 19dad9dfc8
Lazy load dicts, support cdn, config webpack
Signed-off-by: Yukai Huang <yukaihuangtw@gmail.com>
2020-02-05 18:34:02 +08:00
BoHong Li 57345b06f7
refactor: noteActions
Signed-off-by: BoHong Li <raccoon@hackmd.io>
2020-01-06 14:19:03 +08:00
BoHong Li 82cade2b87
refactor: noteActions
Signed-off-by: BoHong Li <raccoon@hackmd.io>
2020-01-06 14:19:03 +08:00
BoHong Li 7f9970449a
refactor: showPublishNote
Signed-off-by: BoHong Li <raccoon@hackmd.io>
2020-01-06 14:19:03 +08:00
BoHong Li 66edff87c5
refactor: show note
Signed-off-by: BoHong Li <raccoon@hackmd.io>
2020-01-06 14:19:03 +08:00
BoHong Li b4ec353fcd
refactor: remove web folder
Signed-off-by: BoHong Li <raccoon@hackmd.io>
2020-01-06 14:19:02 +08:00
BoHong Li 2135cfcd18
refactor: move realtime related code to directory
Signed-off-by: BoHong Li <raccoon@hackmd.io>
2020-01-06 14:19:02 +08:00
BoHong Li 68fcf35c70
feat: merge all route to single file
Signed-off-by: BoHong Li <raccoon@hackmd.io>
2020-01-06 14:19:02 +08:00
BoHong Li 80859f6cf7
feat: remove very old history migration method (since 0.2.8)
Signed-off-by: BoHong Li <raccoon@hackmd.io>
2020-01-06 14:19:01 +08:00
YusukeIwaki 6be31aba9b Remove unused imports, fixing coding style issues.
Signed-off-by: YusukeIwaki <iwaki+git@i3-systems.com>
2019-12-28 23:00:58 +09:00
YusukeIwaki 83fe0815d5 Add environment variables definition for Heroku deploy.
Signed-off-by: YusukeIwaki <iwaki+git@i3-systems.com>
2019-12-28 22:23:20 +09:00
YusukeIwaki d5dd27f745 Implement bitbucket login.
Signed-off-by: YusukeIwaki <iwaki+git@i3-systems.com>
2019-12-28 22:22:15 +09:00
BoHong Li 8629670b0e
feat(imageUpload): upgrade minio version to 7.0.12
Signed-off-by: BoHong Li <raccoon@hackmd.io>
2019-12-13 12:18:42 +08:00
Martin Honermeyer 3fe6ec71e3 Explicitely set uploaded image ACLs for S3 to "public-read"
This works around permission problems with DigitalOcean spaces (where
files are always *private* by default).

This should not pose a difference with AWS and other providers as CodiMD
only works with public S3 assets either way.

Signed-off-by: Martin Honermeyer <maze@strahlungsfrei.de>
2019-12-05 18:37:42 +01:00
Yukai Huang 75ee5ad255
Merge branch 'develop' into feature/configurable-break-style 2019-11-01 10:27:47 +08:00
Yukai Huang f871eff28d
Merge pull request #1327 from kamijin-fanta/github-enterprise
support to login with github enterprise
2019-11-01 10:22:46 +08:00
Yukai Huang 7fd36b1b33
Add https_proxy support to gitlab oauth (#1296)
Add https_proxy support to gitlab oauth
2019-11-01 10:22:08 +08:00
kamijin_fanta 9e6f980d8d github-login: move comment to default.js
Signed-off-by: kamijin_fanta <kamijin@live.jp>
2019-10-30 17:02:15 +09:00
Ruben ten Hove 2a365d6971 fix linter issues
Signed-off-by: Ruben ten Hove <git@rhtenhove.nl>
2019-10-30 07:58:36 +01:00
rhtenhove bac3921197 Add https_proxy support to gitlab oauth
Signed-off-by: Ruben ten Hove <git@rhtenhove.nl>
2019-10-30 07:49:43 +01:00
Yukai Huang 65ecb6d2ec
Allow to generate lower case header references through the conf… (#1310)
Allow to generate lower case header references through the config
2019-10-30 14:44:40 +08:00
hoijui 7c5ac3603a allow to define header link generation style via environment var
Signed-off-by: hoijui <hoijui.quaero@gmail.com>
2019-10-29 10:53:20 +01:00
hoijui 3d5d8e20f7 document `linkifyHeaderStyle` in default.js
Signed-off-by: hoijui <hoijui.quaero@gmail.com>
2019-10-29 09:57:31 +01:00
kamijin_fanta b785ead5e5 github login: fix env name
Signed-off-by: kamijin_fanta <kamijin@live.jp>
2019-10-27 00:01:56 +09:00
kamijin_fanta ba37faf71a github login: default config/config from env vars.
Signed-off-by: kamijin_fanta <kamijin@live.jp>
2019-10-26 22:18:07 +09:00
kamijin_fanta 225e28bdbd support to login with github enterprise
Signed-off-by: kamijin_fanta <kamijin@live.jp>
2019-10-25 15:15:42 +09:00
kondouagi 0dfb8a320d feat: add syntax hilight on pdf
Signed-off-by: kondouagi <kondouagi@gmail.com>
2019-10-22 12:43:09 +09:00
hoijui 34c2bfcfc5 Allow to generate lower case header references through the config (#1305)
This makes the references consistent/compatible with GitHub,
GitLab, Pandoc and many other tools.

This behavior can be enabled in config.json with:

```
"linkifyHeaderStyle": "gfm"
```

Signed-off-by: hoijui <hoijui.quaero@gmail.com>
2019-10-21 22:17:55 +02:00
Yukai Huang 82b5e98f55
Add defaultUseHardbreak environment variable
Signed-off-by: Yukai Huang <yukaihuangtw@gmail.com>
2019-10-20 14:32:06 +08:00
Yukai Huang 495b65e3b9
Add defaultUseHardbreak as constants
Signed-off-by: Yukai Huang <yukaihuangtw@gmail.com>
2019-10-20 14:30:55 +08:00
TAKIMOTO, Atsushi c7a15ecc66 Add allowAnonymousViews option
resolve #1144
set to `false` to delete `freely`, `editable` and `locked` permission when allowAnonymous is true (default is `true`)
Signed-off-by: hakoai <hakoai64@gmail.com>
2019-09-08 21:55:52 +09:00
BoHong Li 85fc41c350
Merge branch 'master' into develop 2019-08-17 00:07:49 +08:00
BoHong Li 044b6b9422
refactor: fix lint
Signed-off-by: BoHong Li <raccoon@hackmd.io>
2019-08-05 10:22:12 +08:00
BoHong Li 6c968f9622
fix: history api failed cause by circular dependency
Signed-off-by: BoHong Li <raccoon@hackmd.io>
2019-08-05 10:04:15 +08:00
BoHong Li ff124ab6bf
refactor: fix line after merged develop
Signed-off-by: BoHong Li <raccoon@hackmd.io>
2019-08-04 23:59:03 +08:00
BoHong Li fffefcc5f8
refactor: fix lint on lib/utils.js
Signed-off-by: BoHong Li <raccoon@hackmd.io>
2019-08-04 23:56:38 +08:00
BoHong Li 534b916abb
refactor: fix lint on lib/response.js
Signed-off-by: BoHong Li <raccoon@hackmd.io>
2019-08-04 23:56:32 +08:00
BoHong Li 81cf993358
refactor: fix lint on lib/realtime.js
Signed-off-by: BoHong Li <raccoon@hackmd.io>
2019-08-04 23:56:32 +08:00
BoHong Li 2c7459c16e
refactor: fix lint on lib/letter-avatars.js
Signed-off-by: BoHong Li <raccoon@hackmd.io>
2019-08-04 23:56:32 +08:00
BoHong Li ac6a605cd9
refactor: fix lint on lib/history.js
Signed-off-by: BoHong Li <raccoon@hackmd.io>
2019-08-04 23:56:31 +08:00
BoHong Li e2a13b05b1
refactor: fix lint on lib/workers/dmpWorker.js
Signed-off-by: BoHong Li <raccoon@hackmd.io>
2019-08-04 23:56:31 +08:00
BoHong Li ee1538eed9
refactor: fix lint on lib/web/userRouter.js
Signed-off-by: BoHong Li <raccoon@hackmd.io>
2019-08-04 23:56:31 +08:00
BoHong Li 3049c64066
refactor: fix lint on lib/web/imageRouter/s3.js
Signed-off-by: BoHong Li <raccoon@hackmd.io>
2019-08-04 23:56:30 +08:00
BoHong Li c8ffd2ab19
refactor: fix lint on lib/web/imageRouter/minio.js
Signed-off-by: BoHong Li <raccoon@hackmd.io>
2019-08-04 23:56:30 +08:00
BoHong Li 0c9195b731
refactor: fix lint on lib/web/auth/twitter/index.js
Signed-off-by: BoHong Li <raccoon@hackmd.io>
2019-08-04 23:56:30 +08:00
BoHong Li bc71b7b31b
refactor: fix lint on lib/web/auth/saml/index.js
Signed-off-by: BoHong Li <raccoon@hackmd.io>
2019-08-04 23:56:29 +08:00
BoHong Li a9bcf055e7
refactor: fix lint on lib/web/auth/openid/index.js
Signed-off-by: BoHong Li <raccoon@hackmd.io>
2019-08-04 23:56:29 +08:00
BoHong Li d5f5bdaa57
refactor: fix lint on lib/web/auth/oauth2/index.js
Signed-off-by: BoHong Li <raccoon@hackmd.io>
2019-08-04 23:56:29 +08:00
BoHong Li 3be119ded1
refactor: fix lint on lib/web/auth/mattermost/index.js
Signed-off-by: BoHong Li <raccoon@hackmd.io>
2019-08-04 23:56:28 +08:00
BoHong Li d8cde49a9c
refactor: fix lint on lib/web/auth/ldap/index.js
Signed-off-by: BoHong Li <raccoon@hackmd.io>
2019-08-04 23:56:28 +08:00
BoHong Li df9eaf7fc4
refactor: fix lint on lib/web/auth/google/index.js
Signed-off-by: BoHong Li <raccoon@hackmd.io>
2019-08-04 23:56:28 +08:00
BoHong Li 41500310b0
refactor: fix lint on lib/web/auth/gitlab/index.js
Signed-off-by: BoHong Li <raccoon@hackmd.io>
2019-08-04 23:56:28 +08:00
BoHong Li 09f2a04bc0
refactor: fix lint on lib/web/auth/github/index.js
Signed-off-by: BoHong Li <raccoon@hackmd.io>
2019-08-04 23:56:27 +08:00
BoHong Li 446d38a842
refactor: fix lint on lib/web/auth/facebook/index.js
Signed-off-by: BoHong Li <raccoon@hackmd.io>
2019-08-04 23:56:27 +08:00
BoHong Li 7c8ade8258
refactor: fix lint on lib/web/auth/email/index.js
Signed-off-by: BoHong Li <raccoon@hackmd.io>
2019-08-04 23:56:27 +08:00
BoHong Li ff72618a9c
refactor: fix lint on lib/web/auth/dropbox/index.js
Signed-off-by: BoHong Li <raccoon@hackmd.io>
2019-08-04 23:56:26 +08:00
BoHong Li 7eecb4a0d7
refactor: fix lint on lib/models/note.js
Signed-off-by: BoHong Li <raccoon@hackmd.io>
2019-08-04 23:56:26 +08:00
BoHong Li 898174426c
refactor: fix lint on lib/config/index.js
Signed-off-by: BoHong Li <raccoon@hackmd.io>
2019-08-04 23:56:26 +08:00
Max Wu ddfea4baee fix: add default value for plantuml server and use https
Signed-off-by: Max Wu <jackymaxj@gmail.com>
2019-08-03 21:23:28 +08:00
Max Wu 75513fae85
Add plantuml support (#1096)
Add plantuml support
2019-08-01 23:43:41 +08:00
BoHong Li 66fa2afaff
feat: change guest random nameing to chance.animal()
Signed-off-by: BoHong Li <raccoon@hackmd.io>
2019-08-01 11:24:02 +08:00
Chulki Lee 1d7895c869 Add plantuml support
Signed-off-by: Chulki Lee <chulki.lee@gmail.com>
2019-07-31 10:02:07 -07:00
Max Wu 62918134c0
Merge branch 'develop' into feature/lutim 2019-08-01 00:22:23 +08:00
Max Wu 0af9bfb015
Merge branch 'master' into feature/disableRequestedAuthnContext-config-option 2019-07-31 23:35:50 +08:00
BoHong Li c628737411
Merge branch 'develop' into refactor-realtime
Signed-off-by: BoHong Li <raccoon@hackmd.io>

# Conflicts:
#	README.md
#	package.json
2019-07-30 18:20:09 +08:00
BoHong Li 0f51d1e306
fix: change note permission cause error
Signed-off-by: BoHong Li <raccoon@hackmd.io>
2019-07-30 18:09:17 +08:00
Max Wu f1680ef7fa fix: code style
Signed-off-by: Max Wu <jackymaxj@gmail.com>
2019-07-28 20:04:41 +08:00
Toshinori Notake 4e91268e1f Make toobusy.maxLag configurable
Signed-off-by: Toshinori Notake <toshi.notake.43568@gmail.com>
2019-07-18 13:57:14 +09:00
BoHong Li a6036cb70b
refactor: back to use js-standard
Signed-off-by: BoHong Li <a60814billy@gmail.com>
2019-05-27 17:53:08 +08:00
BoHong Li 1ac6434ab7
refactor(realtime): parseNoteIdFromSocket to async-await style function
Signed-off-by: BoHong Li <a60814billy@gmail.com>
2019-05-27 17:53:08 +08:00
BoHong Li 17e82c11c9
refactor(realtime): connection flow to queue
Signed-off-by: BoHong Li <a60814billy@gmail.com>
2019-05-27 17:53:07 +08:00
BoHong Li 0b03b8e9ba
refactor(realtime): ifMayEdit
Signed-off-by: BoHong Li <a60814billy@gmail.com>
2019-05-27 17:53:07 +08:00
BoHong Li e773182db0
refactor(realtime): updateNote
Signed-off-by: BoHong Li <a60814billy@gmail.com>
2019-05-27 17:53:07 +08:00
BoHong Li 2dedc84e28
refactor(realtime): extract "save note as revision" to job
Signed-off-by: BoHong Li <a60814billy@gmail.com>
2019-05-27 17:53:06 +08:00
BoHong Li ab37a33e0b
refactor(realtime): add test case for clean dangling user
Signed-off-by: BoHong Li <a60814billy@gmail.com>
2019-05-27 17:53:06 +08:00
BoHong Li d8b18ee241
refactor(realtime): disconnect flow
1. use queue for queueing disconnect request

Signed-off-by: BoHong Li <a60814billy@gmail.com>
2019-05-27 17:53:06 +08:00
BoHong Li f892c68e30
refactor(realtime): update dirty note job
Signed-off-by: BoHong Li <a60814billy@gmail.com>
2019-05-27 17:53:06 +08:00
BoHong Li 0352057c8b
refactor(realtime): extract "update dirty note" to new job
Signed-off-by: BoHong Li <a60814billy@gmail.com>
2019-05-27 17:53:05 +08:00
BoHong Li 702fc48fa8
refactor(realtime): extract "SocketClient" to separate class "RealtimeClientConnection"
Signed-off-by: BoHong Li <a60814billy@gmail.com>
2019-05-27 17:53:05 +08:00
BoHong Li f317171aa0
refactor(realtime): extract user event "permission" to SocketClient
Signed-off-by: BoHong Li <a60814billy@gmail.com>
2019-05-27 17:53:05 +08:00
BoHong Li 968c12ff6c
refactor(realtime: extract user event "delete" to SocketClient
Signed-off-by: BoHong Li <a60814billy@gmail.com>
2019-05-27 17:53:04 +08:00
BoHong Li b17f417af4
feat(realtime): add queue for connect and disconnect queue
Signed-off-by: BoHong Li <a60814billy@gmail.com>
2019-05-27 17:53:04 +08:00
BoHong Li ff72d99269
refactor(realtime): extract user event "online users" to SocketClient
1. extract user event "online users" to SocketClient
2. add test case for that

Signed-off-by: BoHong Li <a60814billy@gmail.com>
2019-05-27 17:53:04 +08:00
BoHong Li c4276e1c28
refactor(realtime): extract user event "online users" to SocketClient
1. extract user event "online users" to SocketClient
2. add test case for that

Signed-off-by: BoHong Li <a60814billy@gmail.com>
2019-05-27 17:53:03 +08:00
BoHong Li b33c91f41d
refactor(realtime): extract user event "version" to SocketClient
1. extract user event "version" to SocketClient
2. add test case for that

Signed-off-by: BoHong Li <a60814billy@gmail.com>
2019-05-27 17:53:03 +08:00
BoHong Li 3259bd0f11
refactor(realtime): extract user event "cursor" related
1. move "cursor focus", "cursor activity", "cursor blur" event handler to SocketClient
2. add test case for that

Signed-off-by: BoHong Li <a60814billy@gmail.com>
2019-05-27 17:53:03 +08:00
BoHong Li 8171860d47
refactor(realtime): extract user event "disconnect" to ClientSocket
1. extract user event "disconnect" to ClientSocket
2. add test case

Signed-off-by: BoHong Li <a60814billy@gmail.com>
2019-05-27 17:53:02 +08:00
BoHong Li 48cebc0ccc
refactor(realtime): extract "refresh" and "user status" to class
1. extract client socket event handler "refresh" and "user status"
to SocketClient class
2. add testcase for this changes

Signed-off-by: BoHong Li <a60814billy@gmail.com>
2019-05-27 17:53:02 +08:00
BoHong Li 85fc2297ac
fix(realtime): compatible extractNoteIdFromSocket failed
fixed url parsed method and add testcase for extractNoteIdFromSocket

Signed-off-by: BoHong Li <a60814billy@gmail.com>
2019-05-27 17:53:02 +08:00
GHOUL Nadir 779fa59dbb Adding an error code to the `{"status":"forbidden"}` response
Signed-off-by: Ghoul Nadir <nadir.ghoul@outlook.com>
2019-05-04 00:18:28 +02:00
Raccoon 440661f1ce
Merge pull request #1196 from toshi0123/fix_avoiding_crash
Fix avoiding crash if URL is invalid
2019-04-30 18:40:18 +08:00
BoHong Li fc642e0d14
fix: migration should return promise
Signed-off-by: BoHong Li <a60814billy@gmail.com>
2019-04-20 01:00:14 +08:00
toshi0123 eff6e04e2b
Fix avoiding crash if URL is invalid
Signed-off-by: toshi0123 <7948737+toshi0123@users.noreply.github.com>
2019-04-18 19:10:46 +09:00
BoHong Li 4e596d724d
Merge branch 'develop' of github.com:hackmdio/codimd into develop 2019-04-15 14:11:50 +08:00
BoHong Li 038803505c
doc: add default setting and README 2019-04-15 14:10:54 +08:00
Raccoon 48a68e015b
Merge pull request #1095 from Thor77/fix-1094
Hide default ports from minio image upload urls
2019-04-15 13:48:44 +08:00
Raccoon d127b8ef7f
Merge pull request #1142 from dg-i/configurable-s3-endpoint
Make AWS S3 endpoint configurable
2019-04-15 13:37:33 +08:00
BoHong Li 8c26107ab1
fix: lint
Signed-off-by: BoHong Li <a60814billy@gmail.com>
2019-04-15 13:36:44 +08:00
Raccoon 43c0bff8c4
Merge pull request #1179 from cdancette/update-history-on-creation
Update history on note creation
2019-04-15 13:26:30 +08:00
BoHong Li 6c137ae6ed
fix: mattermost has been deprecated, use mattermost-redux instead it.
1. change mattermost color and gitlab color to official color
2. Add mattermost icon because Fork-awesome/font-awesome doesn’t provide mattermost icon

Signed-off-by: BoHong Li <a60814billy@gmail.com>
2019-04-15 13:03:31 +08:00
BoHong Li c532742206
refactor: fix lint warning on config
Signed-off-by: BoHong Li <a60814billy@gmail.com>
2019-04-12 18:01:46 +08:00
BoHong Li ee7eea6f91
refactor: fix lint warning on models and migrations
Signed-off-by: BoHong Li <a60814billy@gmail.com>
2019-04-12 18:01:39 +08:00
BoHong Li a34e6a7245
refactor: fix lint warning on lib/auth
Signed-off-by: BoHong Li <a60814billy@gmail.com>
2019-04-12 18:01:35 +08:00
BoHong Li 8d9a6f38c7
refactor: fix lint warning on lib/web/imageRouter
Signed-off-by: BoHong Li <a60814billy@gmail.com>
2019-04-12 18:01:30 +08:00
BoHong Li 319bf6d8b8
refactor: fix lint warning on lib/web/historyRouter.js
Signed-off-by: BoHong Li <a60814billy@gmail.com>
2019-04-12 18:01:23 +08:00
BoHong Li 1e5b4a4382
refactor: fix lint warning on lib/web/noterouter.js
Signed-off-by: BoHong Li <a60814billy@gmail.com>
2019-04-12 18:01:18 +08:00
BoHong Li a52fd0b3f9
refactor: fix lint warning on lib/web/statusRouter.js
Signed-off-by: BoHong Li <a60814billy@gmail.com>
2019-04-12 18:01:10 +08:00
BoHong Li 550e6a831d
refactor: fix lint warning on lib/web/userRouter.js
Signed-off-by: BoHong Li <a60814billy@gmail.com>
2019-04-12 18:01:05 +08:00
BoHong Li 79c6a77d18
refactor: fix lint warning on lib/letter-avatars.js
Signed-off-by: BoHong Li <a60814billy@gmail.com>
2019-04-12 18:00:59 +08:00
BoHong Li f2c8c11ea4
refactor: fix lint warning on lib/logger.js
Signed-off-by: BoHong Li <a60814billy@gmail.com>
2019-04-12 18:00:54 +08:00
BoHong Li 0883595e95
refactor: fix lint warning on lib/response.js
Signed-off-by: BoHong Li <a60814billy@gmail.com>
2019-04-12 18:00:52 +08:00
BoHong Li 4ae1c0ab3e
refactor: replace lz-string with @hackmd/lz-string
Signed-off-by: BoHong Li <a60814billy@gmail.com>
2019-04-12 18:00:22 +08:00
BoHong Li 67707d097f
fix: remove string.js for sucurity issue
1. Upgrade Imgur to fix npm install
2. Upgrade less version for security
3. Change package name in package.json to fit npm package.json rule

Signed-off-by: BoHong Li <a60814billy@gmail.com>
2019-04-12 18:00:22 +08:00
BoHong Li 1150dbe73a
fix: upgrade sequelize to latest version to fix CVE
Signed-off-by: BoHong Li <a60814billy@gmail.com>
2019-04-12 18:00:21 +08:00
BoHong Li 7fcfbae89f
feat: replace imgur with @hackmd/imgur
Signed-off-by: BoHong Li <a60814billy@gmail.com>
2019-04-12 18:00:21 +08:00
BoHong Li 651c11f92a
refactor: replace diff-match-patch to @hackmd/diff-match-patch
Signed-off-by: BoHong Li <a60814billy@gmail.com>
2019-04-11 19:35:12 +08:00
BoHong Li a68d19bc22
fix: scrypt cannot build on some platform, revert the change library commit
Signed-off-by: BoHong Li <a60814billy@gmail.com>
2019-04-10 18:34:31 +08:00
Corentin c078d2d304 Update history on note creation
Signed-off-by: Corentin <corentin@cdancette.fr>
2019-03-24 17:46:11 +01:00
Christoph (Sheogorath) Kern 329d39d0d0
Merge pull request #1131 from SISheogorath/fix/gitlabSnippets
Fix shown but broken GitLab snippets
2019-03-09 14:50:47 +01:00
Sheogorath cda878d377
Add required change for Google+ API deprecation
Since Google+ is shutting down soon, we need to get the profile data
from another URL. Since the library already supports it, all we need to
do is adding a single line of code.

Details:
https://github.com/hackmdio/codimd/issues/1160

Signed-off-by: Sheogorath <sheogorath@shivering-isles.com>
2019-03-09 14:42:06 +01:00
Sheogorath bcb7972607
Fix shown but broken GitLab snippets
To provide a GitLab integration we need the GitLab integration to be
configured. Otherwise we shouldn't show the Snippet button.

This patch adds the requirement to the variable that decides if the
import from snippets button shows up or not.

Signed-off-by: Sheogorath <sheogorath@shivering-isles.com>
2019-03-05 18:16:04 +01:00
Christoph (Sheogorath) Kern de0acbb566
Merge pull request #1153 from toshi0123/for_empty_serverurl
Fix empty serverURL did not redirect properly
2019-03-05 18:11:37 +01:00
Sheogorath b51a048777
Fix wrong value type for HSTS environment variable
Seem like also environment variables are affected. This patch fixes that
as well.

Signed-off-by: Sheogorath <sheogorath@shivering-isles.com>
2019-03-04 17:13:43 +01:00
toshi0123 6aab032709 Fix empty serverURL did not redirect properly
Signed-off-by: toshi0123 <7948737+toshi0123@users.noreply.github.com>
2019-03-04 13:59:14 +09:00
Sheogorath 1ee9874393
Fix names with spaces in letter-avatars
Seems like there is a possible problem when a name containing a space is
passed to this function. using urlencode on the name should fix possible
problems here.

Signed-off-by: Sheogorath <sheogorath@shivering-isles.com>
2019-03-03 15:46:28 +01:00
Mathias Merscher 9613197f5d
make aws s3 endpoint configurable
Signed-off-by: Mathias Merscher <Mathias.Merscher@dg-i.net>
2019-02-11 17:45:24 +01:00
Dylan Dervaux 590b2f9c7d Add default config for lutim
Signed-off-by: Dylan Dervaux <dylanderv05@gmail.com>
2019-02-01 13:42:12 +01:00
Dylan Dervaux 492d38b5ed Add lutim in image upload providers validator
Signed-off-by: Dylan Dervaux <dylanderv05@gmail.com>
2019-02-01 12:36:58 +01:00
Dylan Dervaux 8557133fbe Add imageRouter handler for lutim
Signed-off-by: Dylan Dervaux <dylanderv05@gmail.com>
2019-02-01 12:35:44 +01:00
Sheogorath 806f403045
Disable OpenID by default
We talked about that during a community call. It turned out that not
everyone likes to have OpenID on their instance.

This patch disables OpenID by default.

Signed-off-by: Sheogorath <sheogorath@shivering-isles.com>
2019-01-25 19:31:34 +01:00
Sheogorath 4e81079050
Fix broken PDF export by wrong unlink call
We used `fs.unlink()` to remove the pdf file after we send it out to the
client. This breaks in Node 10, when no function as second parameter is
supplied.

This patches changes it to the `fs.unlinkSync` function that doesn't
have this requirement and this way doesn't crash.

Signed-off-by: Sheogorath <sheogorath@shivering-isles.com>
2019-01-24 13:02:53 +01:00
Daan Sprenkels f7bc1e99c0 Remove blueimp-md5 dependency
Signed-off-by: Daan Sprenkels <hello@dsprenkels.com>
2018-12-22 19:09:50 +01:00
Christoph (Sheogorath) Kern f9cc2ff0ef
Merge pull request #1105 from SISheogorath/fix/gistCSP
Fix broken Gist embedding
2018-12-21 18:39:22 +01:00
Daan Sprenkels 8835a09d95 Update upload provider error message
Fixes #1107.

Signed-off-by: Daan Sprenkels <hello@dsprenkels.com>
2018-12-21 15:30:06 +01:00
Sheogorath 0f9e367015
Fix broken Gist embedding
Looks like GitHub changed their asset system and our CSP prevented them
from getting loaded.

This patch should fix the Gist embedding with enabled CSP by replacing
the old URL `https://assets-cdn.github.com` with the new
`https://github.githubassets.com`.

Signed-off-by: Sheogorath <sheogorath@shivering-isles.com>
2018-12-20 22:49:25 +01:00
Christoph (Sheogorath) Kern f492fea418
Merge pull request #1103 from SISheogorath/fix/localImageUpload
Fix usage of new URL API
2018-12-20 22:42:17 +01:00
Sheogorath 0621d7a72d
Fix usage of new URL API
Due to the deprecation of the old `url`-API provided by NodeJS we
replaced `url.resolve` with `url.URL.resolve`, which doesn't exist.

This patch fixes the local filesystem upload of CodiMD by using the new
API correctly. Creating an URL object and using its href.

Some more background:
https://nodejs.org/api/url.html#url_url_href
https://nodejs.org/api/url.html#url_url_resolve_from_to

Fixes https://github.com/hackmdio/codimd/issues/1102

Signed-off-by: Sheogorath <sheogorath@shivering-isles.com>
2018-12-18 14:52:18 +01:00
Thor77 87ba625d46 Remove checks for protocol before removing port
Signed-off-by: Thor77 <thor77@thor77.org>
2018-12-12 12:47:07 +01:00
Emmanuel Ormancey d73063922c Added a configuration option for passport-saml:
disableRequestedAuthnContext: true|false

By default only Password authmethod is accepted, this option allows any other method.

Issue and option described here:
https://github.com/bergie/passport-saml/issues/226

Signed-off-by: Emmanuel Ormancey <emmanuel.ormancey@cern.ch>
2018-12-12 10:40:24 +01:00
Thor77 e928893cfe
Hide port from minio URL for protocol default port
Signed-off-by: Thor77 <thor77@thor77.org>
2018-12-11 23:00:24 +01:00
Christoph (Sheogorath) Kern 7f0fe6903c
Merge pull request #1091 from SISheogorath/fix/speakerNotesCSP
Fix CSP for speaker notes
2018-12-06 10:35:41 +01:00
Sheogorath ecee16bd73
Fix disqus CSP
Disqus loads it's embed config.js from its root domain
(https://disqus.com). Our CSPs only allow subdomains (e.g.:
https://codimd.disqus.com). This causes the disqus embedding to fail.

This patch should fix this problem by adding https://disqus.com to the
CSP setting. From a security perspective there is no real change. Since
still the same parties are involved.

Signed-off-by: Sheogorath <sheogorath@shivering-isles.com>
2018-12-05 13:17:14 +01:00
Sheogorath a556575b91
Fix CSP for speaker notes
Looks like I was wrong in my previous commit to update revealjs.[1]

The speaker notes broke again with the CSPs. So this patch updates the
hash and this way the speaker notes.

[1]: bcebf1e8d2

Signed-off-by: Sheogorath <sheogorath@shivering-isles.com>
2018-12-05 11:32:14 +01:00
Christoph (Sheogorath) Kern 786140331b
Merge pull request #1086 from SISheogorath/feature/urlWarning
Warn on missing serverURL
2018-12-01 12:25:02 +01:00