Commit Graph

304 Commits

Author SHA1 Message Date
Meitar M
76bff83ca3 Allow http: image URLs if Converse.js is loaded on an insecure origin.
Currently, in order for Converse.js to recognize a pasted URL as an
image, it must be an URL whose protocol is `https:` (`https` in the
URI.js library's notation). This is sensible, but means that any
non-HTTPS image URL is not recognized as a valid URL (and thus will not
be rendered inline, even if `show_images_inline` is set to `true`).

It is important to always check for HTTPS URLs when in a secure context
(i.e., the initial page load was requested via HTTPS) in order to ensure
that non-secured content does not mix with secured content. However, the
inverse is not true: if the original page was loaded over HTTP, then
enforcing HTTPS for images adds arguably no meaningful protection while
also breaking the `show_images_inline` feature for the edge cases where
Converse.js is deployed without HTTPS and a user pastes an HTTP URL.

This patch changes the behavior of the `isImageURL` method such that the
requirement for the pasted URL's protocol to be `https:` is enforced
only when the `window.location.protocol` itself is also `https:`. By
doing this, we ensure that secure origins (i.e., when Converse.js is
loaded over HTTPS initially) are still secured and cannot have non-HTTPS
content introduced to the page via a pasted non-HTTPS URL, however it
also allows non-HTTPS origins to render both HTTP and HTTPS image URLs.
2019-03-09 14:15:22 +02:00
Christoph Scholz
ed9d2a2526 make it configurable whether to respect autojoin 2019-03-09 14:10:40 +02:00
Axel Viala
b51d98d6d1 Fix #1327: Refusing url and email as mentions
Before the function `extractReference` in
`/src/headless/converse-muc.js` matched url and email.

Fix: https://github.com/conversejs/converse.js/issues/1327
2019-03-07 16:53:27 +01:00
JC Brand
2de794abc1
Merge branch 'master' into master 2019-03-06 15:10:26 +01:00
Holger Weiss
a15aec3519 Assume "text-single" as default form field type
As per XEP-0004, the default "type" of data form fields is
"text-single", so a missing "type" attribute should not be treated
differently.

This fixes handling of CAPTCHAs offered by ejabberd.
2019-03-06 15:08:41 +01:00
Christoph Scholz
37800d92d3 allow drag & drop also in MUCs 2019-03-05 18:21:07 +01:00
Emmanuel Gil Peyrot
3aa9ee1ba0 Replace http: with https: in xmpp.org links 2019-03-04 17:49:44 +01:00
wrooot
86730b86bf #1474 Updated lithuanian (lt) translation 2019-03-03 14:36:13 +02:00
JC Brand
b15ebdde40 Update to Backbone 1.4.0 and use fork of Backbone.NativeView
with `_setElement` fix.

See https://github.com/akre54/Backbone.NativeView/pull/29
2019-03-01 11:56:22 +01:00
JC Brand
310b2c723b Fixes #1149
With xhr_user_search_url, contact requests are not being sent out
2019-03-01 11:56:22 +01:00
JC Brand
d4fbdf5629 Fixes #1213. Switch roster filter input and icons 2019-03-01 11:56:22 +01:00
JC Brand
c26dde34f9 Allow setting of debug mode via URL with /#converse?debug=true 2019-02-27 16:28:30 +01:00
JC Brand
61a0e1bb16 New config setting show_client_info
Determines whether we show the icon for opening the client's "About" modal.
2019-02-27 14:42:27 +01:00
JC Brand
49da581d14 Fixes #1400. When chat message is only an emoji, enlarge it 2019-02-27 10:34:47 +01:00
JC Brand
519bd54acb Fixes #1457. Wrong tooltip shown for "unbookmark" icon 2019-02-26 12:08:48 +01:00
JC Brand
d3a4555165 Re-add support for muc_domain and add locked_muc_domain.
updates #1373
2019-02-26 11:58:01 +01:00
JC Brand
2ddd918f6a Fixes #1437. List of groupchats doesn't scroll 2019-02-26 11:57:36 +01:00
JC Brand
5afb3051cc New release v4.1.2 2019-02-22 16:49:45 +01:00
JC Brand
f123f483ae Fixes #1406 2019-02-21 09:19:02 +01:00
JC Brand
ce2ae87df2 Bugfix. Open groupchats not shown when logging in after disconnection
* Replace `tearDown` overrides with event handlers.
* Move presence listeners to `connected` event handler, otherwise they
  don't get called when logging in again after disconnection.
* Add `clearSession` listeners to clean up upon disconnection.
* Use `Promise.all` instead of listening for multiple events.
2019-02-20 23:08:27 +01:00
JC Brand
253958ed93 Prevent duplicate messages by comparing MAM archive id to XEP-0359 stanza ids 2019-02-19 23:08:29 +01:00
JC Brand
e389d77107 New release 4.1.1 2019-02-18 20:40:55 +01:00
André Berenguel
8dcb327ead Update contact nickname when receive a roster push 2019-02-18 20:23:20 +01:00
JC Brand
af0093bd39 Bugfix: MUC invite form not shown 2019-02-18 15:42:56 +01:00
JC Brand
d08f738656 Bugfix: Restore textarea size after sending message 2019-02-14 13:21:26 +01:00
JC Brand
8d00294681 Use origin-id to check for reflected messages.
Also, store the returned `stanza-id` on the message.
2019-02-14 11:33:28 +01:00
JC Brand
5b25d5daaa Don't send markers to someone not on your roster
Updates #324
2019-02-13 19:32:02 +01:00
JC Brand
4c83a23382 Revert "Reject the waitUntilFeaturesDiscovered promise if query failed"
This reverts commit 01f0a65209.

Updates #1410
2019-02-13 15:44:17 +01:00
laszlovl
b172861d2c Dont run fetchRosterContacts async, to prevent processing presence before contacts are created
Fixes #1405
2019-02-13 09:13:45 +01:00
JC Brand
dbcf6002ff Fixes #1442 2019-02-12 19:10:46 +01:00
Witek
84e0ce6617 Change jcbrand to conversejs in releases urls (#1443)
* change jcbrand to conversejs in releases links
2019-02-12 18:19:18 +01:00
laszlovl
590d8769a9 Prevent duplicate messages on MUC join
Fixes #1414
2019-02-08 15:32:21 -07:00
Christoph Scholz
5e1f5785f9 fix moderator commands that change affiliation 2019-02-05 12:47:53 -07:00
Christoph Scholz
b667eae1c8 muc moderator commands can be disabled selectively 2019-01-30 03:42:12 +01:00
Holger Weiss
af091faf33 Resurrect muc_show_join_leave option
The option got lost in commit 9528d81c00.

Fixes #1263
2019-01-29 05:45:35 +01:00
JC Brand
4150a3a70b Add Esperanto as supported language 2019-01-29 05:40:34 +01:00
JC Brand
59a9c86fa5 Fixes #1417 2019-01-28 13:39:33 +01:00
JC Brand
d97deaea80 Fixes #1369
* Add test and changelog entry
* Also show message subject if available
2019-01-28 13:27:25 +01:00
Emmanuel Gil Peyrot
9702e9dee3 Add ARIA live region on chat-content
This asks screen readers to read every message received, and is
mandatory for blind users to get notified of new messages.
2019-01-23 14:01:27 +01:00
Christoph Scholz
9eee13e192 fix direct invite for membersonly room 2019-01-22 10:41:59 +01:00
JC Brand
a1795c29ba 3 small changes
- Set correct default value
- Set proper Makefile recipe dependency
- Fix rendering issue in changelog
2019-01-14 12:06:55 +01:00
Christoph Scholz
84be0fb9f7 new config option "roomconfig_whitelist" 2019-01-12 21:51:47 +01:00
JC Brand
a2f42d27a2 New release 4.1.0 2019-01-11 18:49:37 +01:00
JC Brand
79990f7e01 Don't unnecessarily set height on textarea 2019-01-11 18:38:09 +01:00
JC Brand
305376b27a Update changelog and build 2019-01-11 17:43:08 +01:00
JC Brand
dc07440de8 Bugfix. Don't create chats for messages without body 2019-01-10 21:47:50 +01:00
JC Brand
a4d608dcdf Save room features in separate model
As a namespacing mechanism to avoid clashes.
Fixes bug where two chats are shown as currently being active in the rooms list.
2019-01-10 12:15:59 +01:00
Christoph Scholz
eacd7fd933 implement /destroy command in muc 2019-01-03 13:09:13 +01:00
JC Brand
7d74319efd Fixes #1356 2019-01-03 11:45:52 +01:00
JC Brand
6f10f95d77 Document OMEMO for MUCs. Updates #1180 2018-12-21 06:29:21 +01:00