Guo Xiang Tan
81d3c4a7a1
DEV: Remove unused function.
2020-09-10 15:11:35 +08:00
Guo Xiang Tan
5732e4288e
DEV: Remove redundant variable.
2020-09-10 14:35:15 +08:00
Guo Xiang Tan
5ef9d4d537
PERF: Use 1 query to load group and tag notification default.
2020-09-10 13:19:43 +08:00
Martin Brennan
40d5739a80
DEV: Review fixes for bookmark-list ( #10642 )
...
Make removeBookmark return a promise and do not use setProperties for no reason.
More context at https://review.discourse.org/t/fix-add-bookmark-list-component-10451/14450/3
2020-09-10 15:01:53 +10:00
Guo Xiang Tan
521782fc9c
FIX: Search checkboxes incorrectly being checked on similar prefix.
...
Incorrect search filters like `in:personalasd` will end up checking the
checkbox for `in:personal` because the regexp used was only doing prefix
matching.
2020-09-10 11:49:52 +08:00
Martin Brennan
7f2f87bf59
DEV: Review fixes ( #10641 )
...
See comments in https://review.discourse.org/t/dev-imap-log-to-database-10435/14337/6 for context.
2020-09-10 13:41:46 +10:00
Guo Xiang Tan
e6ca1b4326
FIX: Admin search for PMs should only search own PMs.
...
In c6ceda8c
, a bug was introduced where an admin searching for his own
private messages will actually end up searching through all private
messages on the site.
Follow-up to c6ceda8c4e
2020-09-10 11:37:18 +08:00
Martin Brennan
dede942007
FEATURE: Allow email image embed with secure media ( #10563 )
...
This PR introduces a few important changes to secure media redaction in emails. First of all, two new site settings have been introduced:
* `secure_media_allow_embed_images_in_emails`: If enabled we will embed secure images in emails instead of redacting them.
* `secure_media_max_email_embed_image_size_kb`: The cap to the size of the secure image we will embed, defaulting to 1mb, so the email does not become too big. Max is 10mb. Works in tandem with `email_total_attachment_size_limit_kb`.
`Email::Sender` will now attach images to the email based on these settings. The sender will also call `inline_secure_images` in `Email::Styles` after secure media is redacted and attachments are added to replace redaction messages with attached images. I went with attachment and `cid` URLs because base64 image support is _still_ flaky in email clients.
All redaction of secure media is now handled in `Email::Styles` and calls out to `PrettyText.strip_secure_media` to do the actual stripping and replacing with placeholders. `app/mailers/group_smtp_mailer.rb` and `app/mailers/user_notifications.rb` no longer do any stripping because they are earlier in the pipeline than `Email::Styles`.
Finally the redaction notice has been restyled and includes a link to the media that the user can click, which will show it to them if they have the necessary permissions.
![image](https://user-images.githubusercontent.com/920448/92341012-b9a2c380-f0ff-11ea-860e-b376b4528357.png )
2020-09-10 09:50:16 +10:00
Krzysztof Kotlarek
d260e42c8a
FIX: topic_creator accepts participant_count in import mode ( #10632 )
...
The issue mentioned here: https://meta.discourse.org/t/imported-private-discussion-doesnt-appear-in-the-author-inbox/163252
`participant_count` is important to attribute for private messages. If they are imported, we should allow them to set that attribute.
A workaround would be evaluating `update_statistics` method on each Topic but that is less performant.
2020-09-10 08:16:57 +10:00
Roman Rizzi
cac64a95aa
FIX: We should check for watched words first even if the user is a fast typer. ( #10630 )
2020-09-09 14:36:22 -03:00
Marcus Baw
24cd3e2c2c
fix typo
...
Permenantly Delete -> Permanently Delete
2020-09-09 13:10:33 -04:00
Robin Ward
add3d46bc0
FIX: `approve post count` did not take new topics into account
...
This means if a user created a new topic, and it was approved, it would not
count towards their approval count. Replies worked correctly.
2020-09-09 12:47:37 -04:00
Penar Musaraj
b409954398
DEV: Improve theme support for color definitions ( #10634 )
...
- Lets child components extend color definitions
- Includes default theme color definitions
- Fails gracefully on color stylesheet SCSS errors
- Includes theme variables when extending colors
2020-09-09 11:43:34 -04:00
Discourse Translator Bot
1c71f81144
Update translations
2020-09-09 14:59:40 +00:00
Ahmed Gagan
097f06b4fa
DEV: Add plugin api for adding to search-advanced-options dropdowns ( #10606 )
2020-09-09 15:17:39 +01:00
dependabot-preview[bot]
ac4cbfb61d
Build(deps): Bump onebox from 2.1.1 to 2.1.2 ( #10635 )
...
Bumps [onebox](https://github.com/discourse/onebox ) from 2.1.1 to 2.1.2.
- [Release notes](https://github.com/discourse/onebox/releases )
- [Changelog](https://github.com/discourse/onebox/blob/master/CHANGELOG.md )
- [Commits](https://github.com/discourse/onebox/compare/v2.1.1...v2.1.2 )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-09-09 19:24:23 +05:30
Joffrey JAFFEUX
38c934e1e1
UX: prevents auto capitalize/correct in the emoji picker ( #10636 )
2020-09-09 15:43:18 +02:00
Guo Xiang Tan
611d9f61fd
Fix the build.
2020-09-09 15:43:38 +08:00
Guo Xiang Tan
4994b0ed34
PERF: Remove an unncessary query when check for dark mode.
2020-09-09 15:18:52 +08:00
Guo Xiang Tan
fb7bbae3f4
PERF: Memoize calls to `ApplicationHelper#scheme_id`.
...
The same query was executed 4 times per full page load.
2020-09-09 15:15:15 +08:00
Guo Xiang Tan
9b75d95fc6
PERF: Keep track of first unread PM and first unread group PM for user.
...
This optimization helps to filter away topics so that the joins on
related tables when querying for unread messages is not expensive.
2020-09-09 14:05:41 +08:00
Guo Xiang Tan
0398271f87
FIX: Admin should always be able to view group messages.
...
Follow-up to b0f22f2523
.
Before this fix, `SiteSetting.enable_personal_messages = false` will
prevent admin from viewing group messages.
2020-09-09 08:58:21 +08:00
Blake Erickson
cce41f32b8
DEV: Switch over to a fork of ember-rails ( #10603 )
...
We are switching over to a fork because we are currently on a pinned
version of ember-rails 0.18.5 which is pretty old. Upgrading to the
latest version causes many things to break which isn't really worth the
time to debug while we plan to completely switch over to ember-cli
somewhat soonish. Our fork contains a single cherry-pick commit
https://github.com/emberjs/ember-rails/pull/534
which will fix an issue when running the `rails g migration` command and
it spits out a bunch of deprecation warnings.
2020-09-08 13:23:40 -06:00
Blake Erickson
4dfdfeaafd
DEV: Resolve this child category pending request spec ( #10604 )
...
There is a request spec that was ignored with the `xit` flag almost a
year ago and every time you generate the api docs with
```
rake rswag:specs:swaggerize
```
it shows the output of this pending test and I guess I finally got sick
of looking at it, so here is a fix for it.
Original Commit: d84c34ad75
2020-09-08 13:23:11 -06:00
Penar Musaraj
d4a7058cb1
DEV: Strip unicode from color scheme stylesheet filenames ( #10628 )
2020-09-08 15:00:16 -04:00
Robin Ward
4dd07843c6
FIX: We have changed the way `__widget_helpers` are resolved
2020-09-08 12:10:59 -04:00
Joffrey JAFFEUX
8413d27cf2
FIX: handles different cases of canInvite/canRemove states in PM ( #10607 )
2020-09-08 16:35:59 +02:00
dependabot-preview[bot]
2c66698470
Build(deps): Bump unicorn from 5.6.0 to 5.7.0
...
Bumps [unicorn](https://yhbt.net/unicorn/ ) from 5.6.0 to 5.7.0.
Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-09-08 10:34:02 -04:00
dependabot-preview[bot]
6847b6a566
Build(deps): Bump sidekiq from 6.1.1 to 6.1.2
...
Bumps [sidekiq](https://github.com/mperham/sidekiq ) from 6.1.1 to 6.1.2.
- [Release notes](https://github.com/mperham/sidekiq/releases )
- [Changelog](https://github.com/mperham/sidekiq/blob/master/Changes.md )
- [Commits](https://github.com/mperham/sidekiq/compare/v6.1.1...v6.1.2 )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-09-08 10:30:23 -04:00
dependabot-preview[bot]
3da4ff4611
Build(deps): Bump redis from 4.2.1 to 4.2.2
...
Bumps [redis](https://github.com/redis/redis-rb ) from 4.2.1 to 4.2.2.
- [Release notes](https://github.com/redis/redis-rb/releases )
- [Changelog](https://github.com/redis/redis-rb/blob/master/CHANGELOG.md )
- [Commits](https://github.com/redis/redis-rb/compare/v4.2.1...v4.2.2 )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-09-08 10:30:08 -04:00
dependabot[bot]
d21119ee4f
Build(deps): Bump lodash in /app/assets/javascripts/pretty-text
...
Bumps [lodash](https://github.com/lodash/lodash ) from 4.17.15 to 4.17.20.
- [Release notes](https://github.com/lodash/lodash/releases )
- [Commits](https://github.com/lodash/lodash/compare/4.17.15...4.17.20 )
Signed-off-by: dependabot[bot] <support@github.com>
2020-09-08 10:25:45 -04:00
dependabot[bot]
00e2339e82
Build(deps): Bump lodash in /app/assets/javascripts/discourse-common
...
Bumps [lodash](https://github.com/lodash/lodash ) from 4.17.15 to 4.17.20.
- [Release notes](https://github.com/lodash/lodash/releases )
- [Commits](https://github.com/lodash/lodash/compare/4.17.15...4.17.20 )
Signed-off-by: dependabot[bot] <support@github.com>
2020-09-08 10:25:31 -04:00
dependabot-preview[bot]
d10e3b0461
Build(deps): Bump oj from 3.10.13 to 3.10.14
...
Bumps [oj](https://github.com/ohler55/oj ) from 3.10.13 to 3.10.14.
- [Release notes](https://github.com/ohler55/oj/releases )
- [Changelog](https://github.com/ohler55/oj/blob/develop/CHANGELOG.md )
- [Commits](https://github.com/ohler55/oj/compare/v3.10.13...v3.10.14 )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-09-08 10:21:01 -04:00
dependabot-preview[bot]
2edbfe49b2
Build(deps): Bump puma from 4.3.5 to 4.3.6
...
Bumps [puma](https://github.com/puma/puma ) from 4.3.5 to 4.3.6.
- [Release notes](https://github.com/puma/puma/releases )
- [Changelog](https://github.com/puma/puma/blob/master/History.md )
- [Commits](https://github.com/puma/puma/compare/v4.3.5...v4.3.6 )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-09-08 10:19:46 -04:00
dependabot-preview[bot]
71a7ac365e
Build(deps): Bump rack-protection from 2.0.8.1 to 2.1.0
...
Bumps [rack-protection](https://github.com/sinatra/sinatra ) from 2.0.8.1 to 2.1.0.
- [Release notes](https://github.com/sinatra/sinatra/releases )
- [Changelog](https://github.com/sinatra/sinatra/blob/master/CHANGELOG.md )
- [Commits](https://github.com/sinatra/sinatra/compare/v2.0.8.1...v2.1.0 )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-09-08 10:13:32 -04:00
Joffrey JAFFEUX
02495510e8
FIX: workaround constructor name not available after transpilation ( #10623 )
...
This is only reproducible en production build. In this case, constructor.name could be any value like "i" for example.
2020-09-08 10:14:41 +02:00
Guo Xiang Tan
a1d135f12a
DEV: Correct use of `sanitize_sql_array` in `TopicQuery`.
2020-09-08 12:30:09 +08:00
Guo Xiang Tan
d3ebaa41ce
DEV: Address review comments for 5ed84d9885
.
2020-09-08 11:17:35 +08:00
Guo Xiang Tan
b0f22f2523
SECURITY: Remove indication that a group exists if user can't see it.
...
Minor security fix but we should not leak any hints that a group exists
even if a user does not have access to the group.
2020-09-08 10:53:48 +08:00
Guo Xiang Tan
5ed84d9885
SECURITY: Don't allow moderators to list PMs of all groups.
...
* Also return 404 when a user is trying to list PMs of a group that
cannot be accessed by the user.
2020-09-08 10:37:00 +08:00
Guo Xiang Tan
0d3239bf21
Revert "SECURITY: Don't allow moderators to view the admins inbox"
...
Superseeded by d9a5280f5665d12bf46efd8cdcc6200da2cdedd8
This reverts commit 18d35bf64a
.
2020-09-08 10:36:49 +08:00
Daniel Waterworth
18d35bf64a
SECURITY: Don't allow moderators to view the admins inbox
2020-09-07 18:02:41 +01:00
Joffrey JAFFEUX
0b8e7d88fe
FIX: wraps popper call in afterRender and uses createPopper ( #10621 )
...
Before this fix, popper was sometimes not applied.
2020-09-07 13:33:52 +02:00
dependabot[bot]
27751ca69f
Build(deps): Bump websocket-extensions ( #10617 )
...
Bumps [websocket-extensions](https://github.com/faye/websocket-extensions-node ) from 0.1.3 to 0.1.4.
- [Release notes](https://github.com/faye/websocket-extensions-node/releases )
- [Changelog](https://github.com/faye/websocket-extensions-node/blob/master/CHANGELOG.md )
- [Commits](https://github.com/faye/websocket-extensions-node/compare/0.1.3...0.1.4 )
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-09-07 12:02:38 +02:00
dependabot[bot]
b191ea4f59
Build(deps): Bump websocket-extensions ( #10615 )
...
Bumps [websocket-extensions](https://github.com/faye/websocket-extensions-node ) from 0.1.3 to 0.1.4.
- [Release notes](https://github.com/faye/websocket-extensions-node/releases )
- [Changelog](https://github.com/faye/websocket-extensions-node/blob/master/CHANGELOG.md )
- [Commits](https://github.com/faye/websocket-extensions-node/compare/0.1.3...0.1.4 )
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-09-07 12:02:27 +02:00
dependabot[bot]
2cb0f013cc
Build(deps): Bump elliptic in /app/assets/javascripts/pretty-text ( #10611 )
...
Bumps [elliptic](https://github.com/indutny/elliptic ) from 6.5.2 to 6.5.3.
- [Release notes](https://github.com/indutny/elliptic/releases )
- [Commits](https://github.com/indutny/elliptic/compare/v6.5.2...v6.5.3 )
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-09-07 12:02:09 +02:00
dependabot[bot]
6bff8636e2
Build(deps): Bump elliptic in /app/assets/javascripts/discourse-common ( #10612 )
...
Bumps [elliptic](https://github.com/indutny/elliptic ) from 6.5.2 to 6.5.3.
- [Release notes](https://github.com/indutny/elliptic/releases )
- [Commits](https://github.com/indutny/elliptic/compare/v6.5.2...v6.5.3 )
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-09-07 12:01:37 +02:00
dependabot[bot]
9b187b7e11
Build(deps): Bump http-proxy in /app/assets/javascripts/discourse-common ( #10613 )
...
Bumps [http-proxy](https://github.com/http-party/node-http-proxy ) from 1.18.0 to 1.18.1.
- [Release notes](https://github.com/http-party/node-http-proxy/releases )
- [Changelog](https://github.com/http-party/node-http-proxy/blob/master/CHANGELOG.md )
- [Commits](https://github.com/http-party/node-http-proxy/compare/1.18.0...1.18.1 )
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-09-07 12:00:25 +02:00
dependabot[bot]
c119c07fa4
Build(deps): Bump http-proxy in /app/assets/javascripts/pretty-text ( #10614 )
...
Bumps [http-proxy](https://github.com/http-party/node-http-proxy ) from 1.18.0 to 1.18.1.
- [Release notes](https://github.com/http-party/node-http-proxy/releases )
- [Changelog](https://github.com/http-party/node-http-proxy/blob/master/CHANGELOG.md )
- [Commits](https://github.com/http-party/node-http-proxy/compare/1.18.0...1.18.1 )
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-09-07 12:00:10 +02:00
dependabot-preview[bot]
7b889c6201
Build(deps): Bump nio4r from 2.5.2 to 2.5.3 ( #10620 )
...
Bumps [nio4r](https://github.com/socketry/nio4r ) from 2.5.2 to 2.5.3.
- [Release notes](https://github.com/socketry/nio4r/releases )
- [Changelog](https://github.com/socketry/nio4r/blob/master/CHANGES.md )
- [Commits](https://github.com/socketry/nio4r/compare/v2.5.2...v2.5.3 )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-09-07 11:59:25 +02:00