Guo Xiang Tan
32b4bdaccd
DEV: Remove mocks from tests.
2019-08-08 15:17:45 +08:00
Guo Xiang Tan
740e2a6025
DEV: Add comment about fork of image_optim.
2019-08-08 13:03:35 +08:00
Guo Xiang Tan
636b6c3a5a
FIX: Wrong discobot tutorial started for certain locales.
...
If a locale has triggers that start with the same word, our regexp will
always end up matching the first trigger. For example,
`start tutorial` and `start tutorial advanced`
To support the change, we have to make the match on triggers more
restrictive. `@discobot quote here` will no longer work like `@discobot
quote`.
2019-08-08 10:53:58 +08:00
Guo Xiang Tan
b574276e6e
DEV: Correct hardcoded value in discobot tests.
2019-08-08 10:53:58 +08:00
Guo Xiang Tan
7bd93eba3e
FIX: Gravatar uploads being dependent on authorized_extensions.
2019-08-01 16:24:09 +08:00
Guo Xiang Tan
3b575b82f3
Fix the build.
...
1481ea640c broke it.
2019-08-01 15:23:50 +08:00
Guo Xiang Tan
a1a61fcd2d
DEV: Use File#file? in posts:missing_uploads rake task.
2019-08-01 10:59:34 +08:00
Guo Xiang Tan
8a6ee09008
FIX: Post#each_upload_url yields incorrect path to block when CDN is enabled.
2019-07-31 10:00:52 +08:00
Guo Xiang Tan
1267185a07
DEV: Remove unused option.
...
Follow up to 18ed03e044 .
2019-07-30 21:12:13 +08:00
Guo Xiang Tan
ef46231214
Fix the build.
2019-07-29 20:02:18 +08:00
Guo Xiang Tan
faea594436
DEV: Extract common regexps for multisite.
2019-07-29 19:01:36 +08:00
Guo Xiang Tan
8a64b0c8e8
Revert "DEV: Remove unused kwarg and properly check for local missing uploads."
...
This reverts commit 97769f3d02 .
The code is confusing but this change is quite risky. Defer for now
until we can look at it properly.
2019-07-29 14:35:34 +08:00
Guo Xiang Tan
97769f3d02
DEV: Remove unused kwarg and properly check for local missing uploads.
2019-07-29 14:21:06 +08:00
Guo Xiang Tan
49d9557337
Revert commit that was pushed by mistake.
...
This reverts commit c7516c42e9 .
2019-07-29 11:04:38 +08:00
Guo Xiang Tan
e9dc48ccae
DEV: Fix multisite support for posts:missing_uploads.
2019-07-29 10:56:11 +08:00
Guo Xiang Tan
c7516c42e9
Revert "FIX: reverts #18e2816 ( #7940 )"
...
This reverts commit c7b146cbdf .
2019-07-29 09:18:53 +08:00
Guo Xiang Tan
cbb4af124b
Fix the build.
...
Follow up to 4b0cf7f6dd .
2019-07-15 16:38:54 +08:00
Guo Xiang Tan
4b0cf7f6dd
SECURITY: XSS when displaying watched words in admin panel.
...
The XSS here is only possible if CSP is disabled. Low impact since CSP
is enabled by default in SiteSettings.
2019-07-15 10:55:50 +08:00
Guo Xiang Tan
a4234e9be0
DEV: Minor tweaks to Admin::WatchedWordsController.
2019-07-15 10:22:46 +08:00
Guo Xiang Tan
d21594f4f7
Revert changes added by mistake in 2b19e2acc8.
2019-06-25 15:25:12 +08:00
Guo Xiang Tan
2b19e2acc8
Fix typo in a0aeabbb94.
2019-06-25 15:18:57 +08:00
Guo Xiang Tan
a0aeabbb94
DEV: Safer replacement for old scheme uploads for posts:missing_uploads.
2019-06-25 11:34:26 +08:00
Guo Xiang Tan
f3c13d80c9
DEV: Don't copy file when trying to recover missing uploads.
2019-06-24 16:32:59 +08:00
Guo Xiang Tan
2cc5561504
DEV: Correct description in posts:missing_uploads rake task.
2019-06-24 14:57:43 +08:00
Guo Xiang Tan
7c86f16aa3
FIX: Support carriage return in InlineUploads.
...
Follow up to 8deaef3872 .
2019-06-21 14:07:06 +08:00
Guo Xiang Tan
8deaef3872
FIX: Don't replace img tags within anchor tags with markdown format.
...
Follow up to 9a25b0d614 .
2019-06-21 12:32:02 +08:00
Guo Xiang Tan
9a25b0d614
FIX: Edge case with anchor tag in InlineUploads.
2019-06-21 09:55:56 +08:00
Guo Xiang Tan
53efb7bd24
FIX: BBcode edge case for InlineUploads.
2019-06-20 11:47:51 +08:00
Guo Xiang Tan
34f382b758
FIX: InlineUploads should replace attachment links with markdown text.
2019-06-19 11:15:02 +08:00
Guo Xiang Tan
73a45048a0
FIX: Upload#short_url generates incorrect URL when extension is nil.
2019-06-19 09:10:50 +08:00
Guo Xiang Tan
c3381b845b
DEV: Install diffy in production for rake posts:inline_uploads task.
2019-06-14 14:42:53 +08:00
Guo Xiang Tan
77c06384c0
Fix the build.
2019-06-14 13:56:35 +08:00
Guo Xiang Tan
5d16d10a9e
DEV: Fix edge case for InlineUploads.
2019-06-14 13:48:03 +08:00
Guo Xiang Tan
befb074c98
DEV: InlineUploads should process CDN upload URLs as well.
2019-06-14 13:14:37 +08:00
Guo Xiang Tan
41abebcbce
DEV: Support both http and https for InlineUploads.
2019-06-14 12:48:31 +08:00
Guo Xiang Tan
7bb94e8716
DEV: Increase wait duration between smoke test further during edit.
...
Otherwise, the app detects that we're replying too quickly.
2019-06-14 12:21:54 +08:00
Guo Xiang Tan
eaa7527933
DEV: Switch posts:inline_uploads scope to be more generic.
2019-06-14 11:53:34 +08:00
Guo Xiang Tan
c9db897777
FIX: Remove onebox src from Jobs::PullHotlinkedImages.
...
The test that was added is incorrect because the post was not cooked.
2019-06-14 09:21:25 +08:00
Guo Xiang Tan
9bce3d5e65
DEV: Multisite support for rake posts:inline_uploads.
2019-06-13 16:13:45 +08:00
Guo Xiang Tan
9daed05ad0
Fix the build.
2019-06-13 13:53:43 +08:00
Guo Xiang Tan
7a0d031bc4
FIX: InlineUploads matching on external bbcode img url.
2019-06-13 13:47:36 +08:00
Guo Xiang Tan
782e583844
FIX: Edge cases with markdown references for InlineUploads.
2019-06-13 12:08:01 +08:00
Guo Xiang Tan
93c552afda
FIX: InlineUploads does not correct urls with uppercase extension.
2019-06-13 11:19:33 +08:00
Guo Xiang Tan
5b55252e10
DEV: Add more wait between edit so we don't end up replying too quickly.
2019-06-13 09:14:17 +08:00
Guo Xiang Tan
f0846ea7cf
DEV: Remove unused line.
2019-06-12 17:38:30 +08:00
Guo Xiang Tan
641521896c
FIX: Cover more edge cases in InlineUploads.
2019-06-12 17:06:58 +08:00
Guo Xiang Tan
73bf880f74
FIX: Correct more edge cases with InlineUploads.
2019-06-12 10:44:25 +08:00
Guo Xiang Tan
ff48fbdfda
FIX: InlineUploads raises an error when img tag is invalid.
2019-06-12 10:31:00 +08:00
Guo Xiang Tan
d49c193289
FIX: posts:inline_uploads rake task needs to bypass bump.
2019-06-12 09:13:31 +08:00
Guo Xiang Tan
864222372f
Remove incorrectly committed byebug.
...
Follow up to 49b921147a .
2019-06-11 16:33:49 +08:00
Guo Xiang Tan
49b921147a
FIX: Undefined method in posts:inline_uploads.
2019-06-11 16:28:41 +08:00
Guo Xiang Tan
40e67971f9
DEV: Add spec for Email::Sender for upload links in plain text emails.
2019-06-11 16:02:24 +08:00
Guo Xiang Tan
e5cace9185
FIX: File size text should not be part of link.
2019-06-11 15:21:06 +08:00
Guo Xiang Tan
fb0a655e8a
FEATURE: Update pull hotlinked images to use Upload#short_url.
2019-06-11 15:17:29 +08:00
Guo Xiang Tan
42ab016856
FIX: Use markdown for images and attachments in Email::Receiver.
2019-06-11 14:49:46 +08:00
Guo Xiang Tan
36c0cfa890
FIX: Use new attachment markdown format in ImportScripts::Uploader.
2019-06-11 14:49:28 +08:00
Guo Xiang Tan
9d0fba64c0
FIX: Use attachment format in user export system post take 2.
2019-06-11 12:15:11 +08:00
Guo Xiang Tan
a112259c66
DEV: Missed a spot in 658c6e0caf.
2019-06-11 11:41:28 +08:00
Guo Xiang Tan
658c6e0caf
FIX: Use attachment format in user export system post.
2019-06-11 11:33:01 +08:00
Guo Xiang Tan
d20ea38f02
Fix the build.
...
Follow up to bd538f7437 .
2019-06-11 10:05:57 +08:00
Guo Xiang Tan
06d974d55c
FEATURE: Add base62 sha1 to cooked data attribute
...
* FEATURE: Add base62 sha1 to data attribute in `Post#cooked`.
* FIX: Use `Upload#short_url` when quoting an image.
2019-06-11 11:15:45 +10:00
Guo Xiang Tan
bd538f7437
FIX: Composer preview not caching inline onebox.
2019-06-11 09:14:53 +08:00
Guo Xiang Tan
799bd62803
DEV: Improve PrettyText spec to test for markdown image title attr.
2019-06-10 11:00:23 +08:00
Guo Xiang Tan
1cf3bf016c
Make rubocop happy.
2019-06-10 09:49:02 +08:00
Guo Xiang Tan
29259b46ae
DEV: Verbose mode for posts:inline_uploads rake task.
2019-06-10 08:59:11 +08:00
Guo Xiang Tan
ee142c2173
DEV: More improvements to InlineUploads.
...
* Convert inline links to short path
```
<link> <link>
<link>
```
to
```
<short_path> <short_path>
<short_path>
```
2019-06-07 11:49:30 +08:00
Guo Xiang Tan
782da448a2
FIX: Missing title attribute when quoting an image.
2019-06-06 16:45:12 +08:00
Guo Xiang Tan
2265c5102f
DEV: Remove unnecessary condition.
...
Follow up to 21876d46d6 .
2019-06-06 15:55:49 +08:00
Guo Xiang Tan
95db609586
DEV: Support more formats of inline images.
2019-06-06 15:50:56 +08:00
Guo Xiang Tan
21876d46d6
DEV: Missing loading spinner for staff action logs.
...
Follow up to e0c821ebb0 .
2019-06-06 15:41:55 +08:00
Guo Xiang Tan
3b4432f258
DEV: Refactor specs for Jobs::PullHotlinkedImages.
2019-06-06 14:56:21 +08:00
Guo Xiang Tan
7bd8f715bc
DEV: Prefer this.site.notification_types.
2019-06-06 09:39:59 +08:00
Guo Xiang Tan
d9d36f241d
DEV: Use this.site.get("notification_types") instead.
...
Follow up to fcb7422213 .
2019-06-06 08:18:25 +08:00
Guo Xiang Tan and Bianca Nenciu
fcb7422213
DEV: Avoid hard-coding notification types integer in client side code.
...
Co-authored-by: Bianca Nenciu <nenciu.bianca@gmail.com >
2019-06-04 17:30:46 +08:00
Guo Xiang Tan
6ad58913c8
DEV: Prefer save! over save.
2019-06-04 16:59:29 +08:00
Guo Xiang Tan
70b73c2159
DEV: Use proper heredoc name.
2019-06-04 16:31:18 +08:00
Guo Xiang Tan
5819e446dd
Make lint happy.
2019-06-04 16:14:21 +08:00
Guo Xiang Tan
1991af2abb
DEV: Switch InlineUploads to a regexp based implementation.
2019-06-04 15:54:25 +08:00
Guo Xiang Tan
d93e5fb00d
DEV: Class that converts MD with old attachment links to new MD.
2019-06-04 15:54:25 +08:00
Guo Xiang Tan
bb98785569
DEV: Fix broken Upload#base62_sha1.
2019-06-04 14:10:46 +08:00
Guo Xiang Tan
55fd3acea0
Revert "FIX: Undefined method when serializing a user"
...
This reverts commit 1fbe078ae0 .
`UserProfile` is created in a callback after the user has been created.
As such, it should be impossible for a user to not have a blank
`UserProfile`. This was also improved in
4f5c9bb8d3 .
2019-06-04 09:30:30 +08:00
Guo Xiang Tan
6a274fd2cd
DEV: Remove redundant rake task.
...
Onceoff job created in 028121b95b
2019-05-31 10:05:13 +08:00
Guo Xiang Tan
0eb8d74284
DEV: Reduce object fabrication in CookedPostProcessor spec.
2019-05-30 08:50:10 +08:00
Guo Xiang Tan
8858dbb5b8
DEV: Refactor SystemMessage#create specs.
2019-05-30 07:56:36 +08:00
Guo Xiang Tan
20e783337d
DEV: Remove use of fake external store in optimized images spec.
...
Testing against fake stuff is bad because we're not testing against reality when
reality changes.
2019-05-29 20:13:23 +08:00
Guo Xiang Tan
8d1b0224ac
Fix the build a3938f98f8.
2019-05-29 18:53:31 +08:00
Guo Xiang Tan
a3938f98f8
Revert changes to FileStore::S3Store#path_for in f0620e7118.
...
There are some places in the code base that assumes the method should
return nil.
2019-05-29 18:39:07 +08:00
Guo Xiang Tan
c920f9d137
FIX: Have nginx always pass /uploads/short-url requests to app.
...
Follow up to f0620e7118
2019-05-29 18:19:15 +08:00
Guo Xiang Tan
a206da8e18
DEV: Mark discourse-encrypt plugin as official.
2019-05-29 10:20:46 +08:00
Guo Xiang Tan
f0620e7118
FEATURE: Support [description|attachment](upload://<short-sha>) in MD take 2.
...
Previous attempt was missing `post_uploads` records.
2019-05-29 09:26:32 +08:00
Guo Xiang Tan
63292cecd9
PERF: Prefer joins over IN () queries.
2019-05-29 09:00:15 +08:00
Guo Xiang Tan
6cceb72173
DEV: Reduce verbosity in TopicQuery spec.
2019-05-29 08:32:10 +08:00
Guo Xiang Tan
b1d3c678ca
FEATURE: Support [description|attachment](upload://<short-sha>) in MD. ( #7603 )
2019-05-28 11:18:21 -04:00
Guo Xiang Tan
909ec47ada
DEV: Close modal so other JS tests don't randomly failed.
2019-05-28 11:40:21 +08:00
Guo Xiang Tan
c80ab08e48
DEV: Fix pretenders leaking across acceptance test.
2019-05-28 10:41:22 +08:00
Guo Xiang Tan
f54e4b71b1
DEV: Make CookedPostProcessor#post_process_images method private.
2019-05-27 11:28:37 +08:00
Guo Xiang Tan
fd0eff6ce3
Revert "FIX: Add missing unique index on user_id for user_profiles."
...
Oops `user_id` is the primary key.
This reverts commit 5478aa63ab .
2019-05-24 12:58:36 +08:00
Guo Xiang Tan
5aed463649
Update annotation.
2019-05-24 12:58:26 +08:00
Guo Xiang Tan
5478aa63ab
FIX: Add missing unique index on user_id for user_profiles.
2019-05-24 12:11:49 +08:00
Guo Xiang Tan
4f5c9bb8d3
DEV: Prefer create! over create.
...
We want to know when stuff fails.
2019-05-24 12:07:22 +08:00