[codex] 修复博客正文公开桶图片路径保存失败#144
Merged
Merged
Conversation
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.
变更内容
publicUrl,也识别当前文章已入库图片的/{PUBLIC bucket}/{objectKey}形式。修复原因
前端保存正文时可能传回类似
/tolink-public/blog/{postId}/images/{uuid}.png的公开桶站内路径。后端原逻辑只按数据库中的完整publicUrl做精确匹配,未匹配后会继续按 Markdown 图片来源校验,最终把该路径误判成非法相对路径并返回 400。影响
验证