Commit Graph

2167 Commits (349f4a0f2167159a4a44cd5368b91dff13e2d5de)

Author SHA1 Message Date
guqing 349f4a0f21
fix: issue of post details page without meta_description variables (#2282)
<!--  Thanks for sending a pull request!  Here are some tips for you:
1. 如果这是你的第一次,请阅读我们的贡献指南:<https://github.com/halo-dev/halo/blob/master/CONTRIBUTING.md>。
1. If this is your first time, please read our contributor guidelines: <https://github.com/halo-dev/halo/blob/master/CONTRIBUTING.md>.
2. 请根据你解决问题的类型为 Pull Request 添加合适的标签。
2. Please label this pull request according to what type of issue you are addressing, especially if this is a release targeted pull request.
3. 请确保你已经添加并运行了适当的测试。
3. Ensure you have added or ran the appropriate tests for your PR.
-->

#### What type of PR is this?
/kind bug
/area core
/milestone 1.5.x
<!--
添加其中一个类别:
Add one of the following kinds:

/kind bug
/kind cleanup
/kind documentation
/kind feature
/kind improvement

适当添加其中一个或多个类别(可选):
Optionally add one or more of the following kinds if applicable:

/kind api-change
/kind deprecation
/kind failing-test
/kind flake
/kind regression
-->

#### What this PR does / why we need it:
修复文章内容查询问题导致 meta_description 内容生成为空
#### Which issue(s) this PR fixes:

<!--
PR 合并时自动关闭 issue。
Automatically closes linked issue when PR is merged.

用法:`Fixes #<issue 号>`,或者 `Fixes (粘贴 issue 完整链接)`
Usage: `Fixes #<issue number>`, or `Fixes (paste link of issue)`.
-->
Fixes #2281 

#### Special notes for your reviewer:
/cc @halo-dev/sig-halo 
#### Does this PR introduce a user-facing change?

<!--
如果当前 Pull Request 的修改不会造成用户侧的任何变更,在 `release-note` 代码块儿中填写 `NONE`。
否则请填写用户侧能够理解的 Release Note。如果当前 Pull Request 包含破坏性更新(Break Change),
Release Note 需要以 `action required` 开头。
If no, just write "NONE" in the release-note block below.
If yes, a release note is required:
Enter your extended release note in the block below. If the PR requires additional action from users switching to the new release, include the string "action required".
-->

```release-note
修复文章内容查询问题导致的文章详情页 meta_description 为空 
```
2022-07-29 03:28:13 +00:00
乔戈里 a5f7c438d5
perf: access to admin page changed to template rendering (#2259)
<!--  Thanks for sending a pull request!  Here are some tips for you:
1. 如果这是你的第一次,请阅读我们的贡献指南:<https://github.com/halo-dev/halo/blob/master/CONTRIBUTING.md>。
1. If this is your first time, please read our contributor guidelines: <https://github.com/halo-dev/halo/blob/master/CONTRIBUTING.md>.
2. 请根据你解决问题的类型为 Pull Request 添加合适的标签。
2. Please label this pull request according to what type of issue you are addressing, especially if this is a release targeted pull request.
3. 请确保你已经添加并运行了适当的测试。
3. Ensure you have added or ran the appropriate tests for your PR.
-->

#### What type of PR is this?

/kind improvement

<!--
添加其中一个类别:
Add one of the following kinds:

/kind bug
/kind cleanup
/kind documentation
/kind feature
/kind improvement

适当添加其中一个或多个类别(可选):
Optionally add one or more of the following kinds if applicable:

/kind api-change
/kind deprecation
/kind failing-test
/kind flake
/kind regression
-->

#### What this PR does / why we need it:

访问后台管理时使用重定向,在有反向代理且配置不完善的情况下,会导致重定向的域名发生错误。

https://spring.io/guides/gs/serving-web-content/
#### Which issue(s) this PR fixes:

<!--
PR 合并时自动关闭 issue。
Automatically closes linked issue when PR is merged.

用法:`Fixes #<issue 号>`,或者 `Fixes (粘贴 issue 完整链接)`
Usage: `Fixes #<issue number>`, or `Fixes (paste link of issue)`.
-->
Fixes #2254

#### Special notes for your reviewer:
/cc @halo-dev/sig-halo 

#### Does this PR introduce a user-facing change?



<!--
如果当前 Pull Request 的修改不会造成用户侧的任何变更,在 `release-note` 代码块儿中填写 `NONE`。
否则请填写用户侧能够理解的 Release Note。如果当前 Pull Request 包含破坏性更新(Break Change),
Release Note 需要以 `action required` 开头。
If no, just write "NONE" in the release-note block below.
If yes, a release note is required:
Enter your extended release note in the block below. If the PR requires additional action from users switching to the new release, include the string "action required".
-->

```release-note
修改后台管理页面为直接渲染而不是重定向,以更好的兼容反向代理
```
2022-07-19 02:36:05 +00:00
John Niang 7eef3b7006
Change optimization into improvement (#2235)
We only have the kind/improvement label.
2022-07-11 08:46:12 +00:00
知雨 003ff5ad5b
完善install路径返回的页面结果 (#2225) 2022-07-08 08:30:21 +00:00
John Niang 5798a28471
Revert huaweicloud-sdk-java-obs from 3.21.8.1 to 3.21.4 (#2209)
Signed-off-by: johnniang <johnniang@fastmail.com>
2022-07-06 07:44:12 +00:00
John Niang b926fd0ebe
Fix directory traversal issue while renaming static file (#2207) 2022-07-04 03:16:18 +00:00
若如初见 2a5277a33f
perf: optimize the update logic of post editTime field (#2195)
* fix(): 🚸 文章更新时间 逻辑优化;

只有当修改文章标题 或文章内容时 去更新posts表的edit_time字段

* fix():  文章更新时间 逻辑优化;

只有当修改文章标题 或文章内容时 去更新posts表的edit_time字段

* check code-style

* Update the editTime when saving the draft

* remove useless code
2022-07-04 03:14:24 +00:00
ezio 567c8a2971
Issue-2176 后台通过扩展名过滤上传文件 (#2187) 2022-06-24 15:00:26 +00:00
okayhu 8589889af3
fix: use the original name when uploading the attachment to upyun oss (#2181) (#2185) 2022-06-23 09:54:24 +00:00
ezio f5d35dd26d
Remove exif in image file (#2168)
* Issue-1790[feature] add pre handler for attachment files

* Issue-2121 remove exif from JPEG

* Issue-2121 add an 'enable' option in preHandler

* Issue-2121 add an 'enable' option in preHandler

* Issue-2121 remove useless code

* Issue-2121 ImageFileMultipartFile

* Issue-2121 change method name

* Issue-1720 remove useless annotation and add author on file

* Issue-1720
1. Modify for code review.
2. Keep 'Orientation' Exif tag for images.

* Issue-1720 for review

* Issue-1720 for review

* Issue-1720 remove all Exif
2022-06-21 13:16:20 +00:00
Ryan Wang eab2ee2903
docs: add CODE_OF_CONDUCT.md (#2149) 2022-06-12 06:10:11 +00:00
ezio 127a8b71c0
Filter reserved characters in file names (#2143)
* Issue-2121 bugfix 过滤文件名中的非法字符

* Issue-2121 todo: 需要增加一些单元测试

* Issue-2121 add UT

* Issue-2121 add UT

* Issue-2121 move filter method to FileUtils

* Issue-2121 move filter method to FilenameUtils

* Issue-2121 checkstyle formatted

* Issue-2121
1. add regex to filter more reversed info
2. limit filename length in 200
2. add UT

* Issue-2121 remove tail dots

* Issue-2121 throw  FileOperationException if filename is empty

* Issue-2121 trim() string after substring it

* Issue-2121 change pattern name

* Issue-2121 revert irrelevant code

* Issue-2121 bug, '+' should not be filtered
2022-06-09 07:48:13 +00:00
Simple-Stark 36b99d2476
Fix front matter parsing error (#2137)
* fix #2115

* ci(单元测试): 放开注释@Disabled,避免构建失败

* fix(md文件导入): 对匹配到的Front Matter进行二次校验,如果存在制表符则判定为不是Front Matter

Closes #2115
2022-06-07 01:56:12 +00:00
清靈語 352d9d4e20
使用 Eclipse Temurin 镜像替代 AdoptOpenJDK 镜像 (#2120)
AdoptOpenJDK 项目已迁移至 Eclipse Adoptium,JDK 更名为「Eclipse Temurin」。
https://blog.adoptium.net/2021/08/adoptium-celebrates-first-release/
2022-05-27 09:50:57 +00:00
ETLAN666 3dda1a9f6d
Restrict file extension when importing markdown (#2104)
* fix #2090

* pass the check style

* Revision

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* revision

* fix

* Revision

* revision
2022-05-26 08:40:09 +00:00
Camsyn c2e477fcab
Add support for link group and its sort (#2105)
* fix issue 1905.

* fix issue 1905.

* follow suggestions.

* Update src/main/java/run/halo/app/repository/LinkRepository.java

Co-authored-by: John Niang <johnniang@fastmail.com>

* Withdraw irrelevant modification.

* Withdraw irrelevant modification.

* Withdraw irrelevant modification.

Co-authored-by: John Niang <johnniang@fastmail.com>
2022-05-25 02:10:11 +00:00
yhc 6d4ac6b79f
perf: change the resource address of the default comment component library to unpkg.com (#2098) 2022-05-19 07:59:34 +00:00
yhc 8390752149
feat: add more parameters in mail template. (#2095)
* Fixed the bug of not being able to query according to the content

The content table is associated at query time now.

* Update static file mappings on refresh

* feat:add more parameter in mail template

* Update CommentEventListener.java

* Update CommentEventListener.java

* Update CommentEventListener.java
2022-05-18 06:50:09 +00:00
零殇_Fanzero 46220a9286
feat: uri encode processing for attachment paths when querying attachments (#1874)
* Deal with illegal character

* Update FilePathDescriptor.java

* 后端对链接进行encodeURI

* 删除之前无用的test

* Add some testcase for convertToDto

* checkstyle

* delete test

当前该测试用例貌似并不能在全平台上成功运行,所以废弃
2022-05-17 15:22:12 +00:00
John Niang 0e3890ada4
Add Pull Request template (#2078)
https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/creating-a-pull-request-template-for-your-repository
Signed-off-by: johnniang <johnniang@fastmail.com>
2022-05-10 03:22:15 +00:00
Ryan Wang 82dd3a30dc
docs: update README.md and CHANGELOG.md for new version (#2076)
* docs: update README.md and CHANGELOG.md for new version

Signed-off-by: Ryan Wang <i@ryanc.cc>

* Update CHANGELOG.md

Co-authored-by: guqing <38999863+guqing@users.noreply.github.com>

Co-authored-by: guqing <38999863+guqing@users.noreply.github.com>
2022-05-09 08:30:15 +00:00
yhc 508c41b0fc
feat: Optimized word count for non-Chinese articles (#1865)
* feat: word count optimization

Now it can accurately identify the number of words in English articles and mixed language articles with character fieds.

* checkstyle

* delete field charCount

* fix typo and add some complex unit test

* refine unit test

* uniform word count

* fix style
2022-05-06 07:30:15 +00:00
John Niang 15d2f8e56c
Set transaction isolation to read_uncommitted due to @Async (#1916)
* Set transaction isolation to read_uncommitted due to @Async

Comment events handlers are executed asynchronously.
And default transaction isolation is read_committed,
so the handlers can not see the comments created by event dispatcher

Signed-off-by: johnniang <johnniang@fastmail.com>

* Use @TransactionalEventListener instead

Signed-off-by: johnniang <johnniang@fastmail.com>
2022-05-06 05:08:13 +00:00
yhc bca4e53e77
Update the path patterns of static files while refreshing (#1907)
* Fixed the bug of not being able to query according to the content

The content table is associated at query time now.

* Update static file mappings on refresh
2022-05-06 03:20:13 +00:00
Ljfanny b20ab0f1e5
fix: Accessing the /install interface exposes the administrator interface address (#1908)
* Update MainController.java

* Update MainController.java
2022-05-05 07:26:36 +00:00
John Niang ff782c2e6f
Pass IOException into exception stack instead of ignoring it (#1913)
* Set IOException into exception stack

Signed-off-by: johnniang <johnniang@fastmail.com>

* Fix checkstyle error: newline needed
2022-05-05 03:42:12 +00:00
John Niang 913002d56d
Refine contribution.md to be clearly (#1890)
* Refine contribution.md to be clearly

Signed-off-by: johnniang <johnniang@fastmail.com>

* Replace submodule sub-command with --recursive

Signed-off-by: johnniang <johnniang@fastmail.com>
2022-04-24 13:10:11 +00:00
yhc 1f75ba09f8
Fixed the bug of not being able to query according to the content (#1873)
The content table is associated at query time now.
2022-04-22 03:46:11 +00:00
anshangPro de28811549
temporarily stop database connection while backing up database files (#1867)
* fix backup

* limit the scope of modification to Windows system and h2 database

* Code style union

* Code style union
2022-04-22 02:40:10 +00:00
ikvarxt f40aed9a63
fix typo: swagger api operation title typo (#1870) 2022-04-21 07:22:12 +00:00
ntdgy 28810d103c
feat: SMTP support configuration starttls (#1861)
* 为office365,icloud增添starttls支持

* 增添启用starttls的按钮
2022-04-20 06:16:10 +00:00
ntdgy 6d1fcc73b4
Handle exception while sending test email (#1860)
* 添加邮件发送失败时的报错信息

* 按照修改建议进行修改

* 按照修改建议进行修改

* 将exception的异常处理修改为instanceof

* 在ControllerWxceptionHandler中添加对应异常处理

* 删除调试输出,优化报错信息
2022-04-20 02:18:09 +00:00
laohuihui c468bc0dfa
fix typo: eanbled to enabled (#1837)
* fix typo: eanbled to enabled
2022-04-11 21:36:16 +08:00
Ryan Wang ce9284b962
release: 1.5.2 (#1832)
Signed-off-by: Ryan Wang <i@ryanc.cc>
2022-04-10 16:39:11 +08:00
guqing 57965ed934
refactor: optimize post update listener code (#1827) 2022-04-08 04:58:17 +00:00
guqing e93092da24
refactor: category authentication and post authentication (#1826) 2022-04-07 14:02:36 +00:00
guqing 90cd9fdd91
fix: the encrypted post is in an incorrect state after being recovered from the recycle (#1824) 2022-04-07 13:17:14 +00:00
guqing 15dfa54e44
fix: posts in the recycle are not excluded when calculating posts under tag (#1823) 2022-04-07 12:35:33 +00:00
guqing 7367556c12
fix: posts in the recycle are not excluded when calculating posts under category (#1822)
* fix: posts in the recycle are not excluded when calculating posts under category

* refactor: post status filtering under category
2022-04-07 11:33:02 +00:00
guqing bdb1eeb80e
fix: the content cannot be saved problem when the patch status of V1 version of post content is recycle status (#1814)
* fix: when the patch status of V1 version of post content is recycle status, the content cannot be saved

* fix: code style
2022-04-07 07:31:33 +00:00
guqing 8591a1ecbf
fix: post modified in the recycle will be restored (#1820) 2022-04-06 08:10:46 +00:00
guqing 63e8cd0cd5
fix: batch publishing does not refresh private status (#1821) 2022-04-06 08:08:39 +00:00
guqing 09f1f4d9db
chore: upgrade spring boot to 2.5.12 (#1819) 2022-04-06 07:56:42 +00:00
Li 5e2f6e2351
refactor: modify the frontMatter export format to yaml syntax (#1813)
* fix: markdown import multi tag/category parsing problem

* fix: markdown import multi tag/category parsing problem
2022-04-06 03:59:43 +00:00
guqing 90d1bce9b9
fix: update the posts encryption status synchronously after deleting the category (#1815)
* refactor: update the posts encryption status synchronously after deleting the category

* chore: delete unused code
2022-04-04 03:40:41 +00:00
guqing 1de5799f82
Fix the problem of duplicate path separator in windows system (#1812)
* fix: duplicate path separator in windows system

* fix: code style
2022-04-02 10:40:40 +00:00
Ryan Wang 6a2602eef2
chore: issue templates add checklist (#1810)
* chore: issue templates add checklist

Signed-off-by: Ryan Wang <i@ryanc.cc>

* Update .github/ISSUE_TEMPLATE/bug_report.en.yml

Co-authored-by: BugKing <wangzhen@fit2cloud.com>

* Update .github/ISSUE_TEMPLATE/bug_report.zh.yml

Co-authored-by: BugKing <wangzhen@fit2cloud.com>

Co-authored-by: BugKing <wangzhen@fit2cloud.com>
2022-04-02 04:33:36 +00:00
guqing 36abdba2af
fix: the problem of encrypted category displayed in query posts according to category (#1811) 2022-04-02 04:00:11 +00:00
Ryan Wang 438b977f05
chore: issue template add hints on how to get logs (#1804)
Signed-off-by: Ryan Wang <i@ryanc.cc>
2022-04-01 07:47:18 +00:00
guqing 32f24626b1
fix: NPE when deleting category (#1806) 2022-04-01 07:37:43 +00:00