Repository navigation
fix: 🐛 上流CodiMD 2.5.0を取り込み画像アップロードのTLSエラーを修復 - #13
Draft
Kentaro1043 wants to merge 138 commits into
Draft
Kentaro1043 wants to merge 138 commits into
Kentaro1043 wants to merge 138 commits into
Conversation
Signed-off-by: BinotaLIU <binota@binota.org>
Signed-off-by: BinotaLIU <binota@binota.org>
Signed-off-by: BinotaLIU <binota@binota.org>
Signed-off-by: Tamotsu Takahashi <ttakah@gmail.com>
hackmdio#1581 (comment) Signed-off-by: Tamotsu Takahashi <ttakah@gmail.com>
Move HTML from JS to EJS. hackmdio#1581 (comment) hackmdio#1581 (comment) Signed-off-by: Tamotsu Takahashi <ttakah@gmail.com>
Move HTML from JS to EJS I don't know how to register i18n helper to handlebars, so "export to raw HTML" has not been touched. You can do the same for html.hbs if you want. Signed-off-by: Tamotsu Takahashi <ttakah@gmail.com>
hackmdio#1580 (comment) Signed-off-by: Tamotsu Takahashi <ttakah@gmail.com>
The function should match only the beginnings of lines. For example, see this testcase: ``` :::spoiler here is a ::: ::: ::: ``` The last line should be completed. Without this patch, the third line is completed and the last is not. Signed-off-by: Tamotsu Takahashi <ttakah@gmail.com>
Signed-off-by: Joachim Mathes <joachim_mathes@web.de>
simplify the regex suggested by yukaii in hackmdio#1605 Co-authored-by: Yukai Huang <yukaihuangtw@gmail.com>
simplify the regex suggested by yukaii in hackmdio#1605 Co-authored-by: Yukai Huang <yukaihuangtw@gmail.com> Signed-off-by: Tamotsu Takahashi <ttakah@gmail.com>
Signed-off-by: Max Wu <jackymaxj@gmail.com>
Signed-off-by: Max Wu <jackymaxj@gmail.com>
…-data-filename-zero Avoid append zero suffix on exporting user data
…-for-return-url Handle when request url has no valid referer
ref issue: aws/aws-sdk-js-v3#1396 Signed-off-by: Max Wu <jackymaxj@gmail.com>
Signed-off-by: Max Wu <jackymaxj@gmail.com>
Signed-off-by: Max Wu <jackymaxj@gmail.com>
Signed-off-by: Max Wu <jackymaxj@gmail.com>
…d-s3-config Fix S3 client config passing for image upload
…-mathjax Add TeX mhchem extensions for MathJax
…art.js-1.15.0 Upgrade flowchart.js to version 1.15.0
Signed-off-by: Raccoon <raccoon@hackmd.io>
Signed-off-by: Yukai Huang <yukaihuangtw@gmail.com>
Signed-off-by: Yukai Huang <yukaihuangtw@gmail.com>
Signed-off-by: Yukai Huang <yukaihuangtw@gmail.com>
Signed-off-by: Yukai Huang <yukaihuangtw@gmail.com>
Signed-off-by: Raccoon <raccoon@hackmd.io>
Signed-off-by: Peter Dave Hello <hsu@peterdavehello.org>
npm found 160 vulnerabilities (6 low, 75 moderate, 63 high, 16 critical) from the original dependencies. Using `npm audit fix` to update most of the dependencies will eliminate 37 of the 160 vulnerabilities. markmap-lib was excluded in this update because it actually contains breaking changes. Signed-off-by: Peter Dave Hello <hsu@peterdavehello.org>
Signed-off-by: Peter Dave Hello <hsu@peterdavehello.org>
Signed-off-by: Peter Dave Hello <hsu@peterdavehello.org>
Reference: e6d2b7a Signed-off-by: Peter Dave Hello <hsu@peterdavehello.org>
Signed-off-by: Michael Wang <michael19920327@gmail.com>
Signed-off-by: Yukai Huang <yukaihuangtw@gmail.com>
…esBaseline Update npm dependencies
…-prevent-xss fix: sanitize pdf url to prevent XSS on inline PDFs
Update both Traditional and Simplified Chinese locales
Signed-off-by: hcyuser <user@hcy.idv.tw>
Signed-off-by: hcyuser <user@hcy.idv.tw>
Signed-off-by: Yukai Huang <yukaihuangtw@gmail.com>
Signed-off-by: Yukai Huang <yukaihuangtw@gmail.com>
Signed-off-by: stanley2058 <stanley2058@yahoo.com.tw>
Signed-off-by: stanley2058 <stanley2058@yahoo.com.tw>
Signed-off-by: stanley2058 <stanley2058@yahoo.com.tw>
Release 2.5.0
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
| uploadProvider.uploadImage(files.image.filepath, function (err, url) { | ||
| // remove temporary upload file, and ignore any error | ||
| fs.unlink(files.image.path, () => {}) | ||
| fs.unlink(files.image.filepath, () => {}) |
|
|
||
| // export the data of the authenticated user | ||
| appRouter.get('/me/export', userController.exportMyData) | ||
| appRouter.post('/me/export', urlencodedParser, csurfMiddleware, userController.exportMyData) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
ConoHaへの画像アップロードが
unable to get local issuer certificateで失敗し、画像を埋め込めなくなっている。現行のNode.js 10では、ConoHaが現在提示するGlobalSign Root R46の証明書チェーンを検証できない。上流のリリースをマージし、ランタイムと依存関係を上流に合わせて更新する。
What Changed
2.5.0をマージし、Node.jsを16.20.2へ更新。Dockerのビルド・ランタイムとtraP側のCIも上流のイメージに合わせる。traP側のCI対応
上流2.5.0の取り込みに加え、traPのリポジトリ規則に合わせてCIのActionsを完全なコミットSHAで固定し、
GITHUB_TOKENの権限をcontents: readに制限する。テストCIのActions v4への更新とGit依存のHTTPS利用は後続の上流CIに合わせ、SHA固定・権限制限はtraP独自変更としている。イメージ作成CIは既存Actionsの版を保持してSHA固定し、GHCRへのpackages: writeはイメージ作成ジョブに限定する。目次検査のdoctocは、Node.js 14でも動く既存ロックと同じ1.4.0に固定する。Verification
identity.tyo1.conoha.ioとobject-storage.tyo1.conoha.ioへHTTPS HEADを実行し、両方でauthorized=trueを確認。追加CA設定は使用していない。ARM環境の検証ではインストールスクリプトを省略し、必要なネイティブ依存を個別に再構築している。通常のamd64 Dockerビルドと、本番ストレージへの実際のアップロードは未確認。
Review Guide
PRの全差分には上流133コミットの変更が含まれる。まず今回の競合解消とCI調整を確認し、その後に既存traP機能との互換性を確認する。
今回の調整箇所
lib/routes.jsgreedyAuthと上流のCSRFミドルウェアをトップページで両立していることpublic/js/cover.js・public/views/index/body.ejspublic/views/codimd/head.ejs・foot.ejs・public/views/pretty.ejs・slide.ejspackage.json・package-lock.json.github/workflows/main.ymlマージの競合解消と手動調整だけを抽出するコマンド(競合マーカーの削除も表示される):
別コミット
6c706a37はStandardの書式修正と未使用importの削除のみ。以前からあるtraP独自機能
lib/auth/trap/index.js、lib/auth/index.js、lib/config/。lib/imageRouter/swift.js。今回このファイル自体には変更なし。lib/notes.js、lib/models/note.js、public/js/cover.js、public/views/index/body.ejs。public/js/extra.js、public/js/render.js、public/js/index.js、public/views/、lib/csp.js。app.js、webpack.common.js、.github/workflows/main.yml。上流2.5.0との差分で、既存分を含むtraP独自変更を一覧できる:
自動マージされた箇所も互換性の確認対象となる。実環境でのtraPログイン・セッション維持、ノート一覧とエクスポート、絵文字・数式表示、画像アップロードは未確認。