Commit Graph

1810 Commits (567c8a29711719ac52c65435d2a7f44e405d2bf5)

Author SHA1 Message Date
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
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
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
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
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
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
guqing 36abdba2af
fix: the problem of encrypted category displayed in query posts according to category (#1811) 2022-04-02 04:00:11 +00:00
guqing 32f24626b1
fix: NPE when deleting category (#1806) 2022-04-01 07:37:43 +00:00
guqing 7d9da09b49
refactor: clear the deprecated attributes value of post content when prePersist and preUpdate (#1797) 2022-03-31 11:52:27 +00:00
Ryan Wang ec6df79e7a
release: 1.5.1 (#1794)
Signed-off-by: Ryan Wang <i@ryanc.cc>
2022-03-30 17:54:44 +08:00
guqing 2bccfb1abb
refactor: transition behavior of post state after category updated (#1785)
* refactor: transition behavior of post state after category updated

* fix: post status

* refactor: category encryption

* refactor: modify unit test case

* fix: category encryption when post has a password
2022-03-29 16:58:40 +00:00
guqing a7825f3f45
refactor: remove parameter assertion (#1787) 2022-03-29 11:53:21 +00:00
guqing 489ffc8418
fix: the redirected URL will be garbled when include Chinese (#1786) 2022-03-29 10:45:48 +00:00
guqing f5f7ddb410
Fix the problem of post list is incomplete due to no recursive query categories (#1781)
* fix: Post list is incomplete due to no recursive query categories

* feat: Add unit test case for PostRefreshStatusListener
2022-03-28 07:48:49 +00:00
Ryan Wang 6533089555
release: 1.5.0 (#1760)
Signed-off-by: Ryan Wang <i@ryanc.cc>
2022-03-22 21:15:30 +08:00
luoxx 55887343f9
Add Redis cache store for distributed deployment (#1751)
* add new cache way - redis

* Optimize redis operation

* Remove public from CacheWrapper class

* add redis cache unit test

* refactor: test case for redis cache store

Co-authored-by: guqing <1484563614@qq.com>
2022-03-18 11:07:51 +08:00
Ryan Wang 8c9499ceaf
release: 1.5.0-beta.1 (#1749)
Signed-off-by: Ryan Wang <i@ryanc.cc>
2022-03-14 21:29:50 +08:00
John Niang 628eb2f1ae
Reverse theme required version compatibility check (#1747)
Signed-off-by: johnniang <johnniang@fastmail.com>
2022-03-14 21:12:05 +08:00
guqing 1713be8daf
Support receiving rendering results for journal(#1739) 2022-03-11 17:37:34 +08:00
Ryan Wang e692cb3186
release: 1.5.0-alpha.3 (#1730)
Signed-off-by: Ryan Wang <i@ryanc.cc>
2022-03-09 21:15:58 +08:00
guqing d0ca7bd9d0
feat: Add comment assembler for theme render (#1729)
* feat: Add comment assembler for theme render

* fix: code style

* fix: page converter

* refactor: clear sensitive field value
2022-03-09 19:19:49 +08:00
guqing 7d4075eb3a
refactor: Use Assembler to replace the original converter (#1724) 2022-03-09 14:19:05 +08:00
guqing f733fbea7c
fix: No EntityManager with actual transaction available for current thread when remove method called (#1716) 2022-03-09 12:15:34 +08:00