Commit Graph

653 Commits

Author SHA1 Message Date
Facundo Batista
be5792cb79 Merged master in 2018-04-18 16:03:19 -03:00
Facundo Batista
04b6d70b01 Added a generic way to migrate from a json file 2018-04-18 15:54:54 -03:00
Vincent Bernat
9618c0f3a3 jade: avoid using eval once compiled
Use of eval is handy when we need to automatically reload a
template. However, in production, this is slow and unsafe. Moreover,
when using CSP, we have to use 'unsafe-eval' which brings shame to
most of us. It appears use of eval() is not needed because the
template has already been translated to Javascript. We just need to
bind "jade" to its local scope.

So, we add an additional wrapper function binding "jade" to the local
scope. Moreover, when compiling the template, we add a flag to the
function to know it has already been compiled. In this case, we
execute it with "jade" in its scope. Otherwise, we keep using eval.

Quickly tested in both situations. Seem to work.

Fix #274.
2018-04-17 22:54:22 +02:00
Pelle Nilsson
22a36bdb7c Support notifications also for replies 2018-04-15 19:42:31 +02:00
Pelle Nilsson
da6bb0cec7 Fix faulty check for parent comment 2018-04-15 19:26:44 +02:00
Rocka
30fef390f5
fix: admin and demo view redirect issue 2018-04-05 23:10:46 +08:00
Rocka
4e2d2dfb20
i18n: add space between number and CJK character 2018-04-05 22:46:17 +08:00
Yuchen Pei
73c7933548 A quick dirty fix of #401 (#406)
Fix URL in moderation mails if isso runs in a sub-URL (closes #401 )
2018-04-02 23:02:45 +02:00
Cimon Lucas (LCM)
361c596bf2 Adding support for ISSO_CORS_ORIGIN env variable to allow defining wildcard CORS origins 2018-04-02 09:40:34 +02:00
Pelle Nilsson
c9045f5b1f Implement opt-out for email notifications 2018-02-21 21:39:35 +01:00
Pelle Nilsson
bc4bc55025 Include link to comment in email notifications 2018-02-20 20:03:52 +01:00
Pelle Nilsson
2e85ec653f Make SMTP connections thread safe 2018-02-18 16:48:08 +01:00
Pelle Nilsson
107b9be003 Add notification column to database if needed 2018-02-18 14:00:18 +01:00
Pelle Nilsson
c30873e8a2 Merge remote-tracking branch 'tsileo/reply_notification' into reply_notification
Conflicts:
	isso/css/isso.scss
	isso/db/comments.py
	isso/ext/notifications.py
	isso/js/app/i18n/fr.js
	isso/js/app/isso.js
	isso/js/app/text/postbox.html
	isso/views/comments.py
2018-02-18 13:58:33 +01:00
cclauss
7f55c81e08 autopep8 the code and then flake8 2018-02-08 22:46:14 +01:00
Jelmer Vernooij
2cc564eeca
Merge pull request #380 from cclauss/drop-support-for-python-2.6-and-3.3
Drop support for python 2.6 and 3.3
2018-01-31 12:42:41 +00:00
Martin Schenck
6ccebce041 Improved German translation 2018-01-28 19:52:46 +01:00
cclauss
b569b19a7f compat.py passes pyflakes test
Drop support for Python 2.6 and 3.3
2018-01-25 15:03:12 +01:00
Benoît Latinier
2b56963f31 fix pyflakes error, make travis happy 2018-01-20 23:03:08 +01:00
Benoît Latinier
d2b573a4d5
Merge pull request #256 from blatinier/issue-10/admin-interface
Add a basic admin interface (Fix issue #10)
There are more to add in the interface but it's a good start.
2017-11-27 22:55:53 +01:00
Jelmer Vernooij
ea3507910f
Merge pull request #354 from mpchadwick/feature/comment-placeholder-color
Darken placeholder text
2017-11-22 22:11:56 +00:00
Max Chadwick
3efe0c86d9 Put hu into correct alphabetical order 2017-11-21 21:34:06 -05:00
Max Chadwick
9ab23c0908 Fix hungarian translation 2017-11-21 20:50:14 -05:00
Max Chadwick
21983a61b6 Darken placeholder text
Previously color contrast was insufficient per WCAG AA
2017-11-20 22:15:09 -05:00
Peter Guthy
02eaffea21 Added hungarian translation 2017-10-31 13:47:49 +01:00
Martin Zimmermann
650c6cf126 Merge pull request #341 from macedigital/fix-identicon-hash-size
Fix: Truncate key-length when generating identicons
2017-08-17 11:27:59 +02:00
Martin Zimmermann
6a60f831b0 remove unused variable 2017-08-17 10:42:36 +02:00
Martin Zimmermann
9b0e3d29fe revert incorrect removal of the internal server startup CLI 2017-08-17 10:37:28 +02:00
Matthias Adler
43623f349b
Fix: Truncate key-length when generating identicons
Hex-digits with character count above 17 cannot be safely converted to an Integer, see [MAX_SAFE_INTEGER](https://medium.com/the-node-js-collection/javascripts-number-type-8d59199db1b6#53cd).

Therefore, when long keys (e.g. 32 characters) are passed into `generateIdenticon()`, and the modulus of 2^18 is performed, the result is 0 all the time. This means, the identicon will render as an empty svg image.

Here is a proof-of-concept (run in any modern browser):

```js
const key = '841b625dcf75413ff3ed5137a81ff1c3';
const int = parseInt(key, 16);
const hash = int % Math.pow(2, 18);
// throws, due to floating point conversion / integer overflow
console.assert(258499 === hash, "Modulus for 'hash' should be != 0");

const int2 = parseInt(key.substr(-16), 16);
const hash2 = int2 % Math.pow(2, 18);
// works as expected
console.assert(258048 === hash2, "Modulus 'hash2' should be != 0");
```

Truncating the passed in argument to a maximum of 16 characters solves the issue.

As a sidenote, the same code in Python will work correctly:

```python
key = '841b625dcf75413ff3ed5137a81ff1c3'
int = int(key, 16)
hash = int % pow(2, 18)
assert 258499 == hash
```
2017-08-06 17:06:20 +02:00
Martin Zimmermann
c72946dc14 Run travis tests with python 3.5 & python 3.6 2017-07-30 22:38:12 +02:00
Martin Zimmermann
e3a8d0b93d fix db test with incorrect SQL id, that happened work with pre-3.6 dicts before 2017-07-30 22:22:52 +02:00
Jelmer Vernooij
39debdb011
Fix flakes errors. 2017-07-29 13:06:40 +00:00
Jelmer Vernooij
8c33a84dd3 Merge pull request #253 from jGleitz/apidoc
Update API documentation.
2017-07-23 21:46:43 +00:00
Shengbin Meng
2f7d6aa09b Merge branch 'master' into patch-1 2017-07-21 11:44:26 +08:00
Jelmer Vernooij
71bda25568 Merge pull request #312 from pellenilsson/fix-require-email
Fix require-email setting
2017-07-17 21:03:56 +00:00
Jelmer Vernooij
c8e4e74514 Merge pull request #335 from philipcmonk/time
Display only complete units of time
2017-07-17 20:51:47 +00:00
Jelmer Vernooij
afbcb6413e
Add da entry to i18n.js. 2017-07-17 20:49:56 +00:00
Jelmer Vernooij
6006cd9e82
Merge Danish translation from https://github.com/MadsRC/isso 2017-07-17 20:47:58 +00:00
Philip Monk
26f0e06e78 display only complete units of time
fixes #283
2017-07-15 18:20:02 -07:00
Jelmer Vernooij
616c61ea88 Merge pull request #291 from ivegotasthma/ivegotasthma-patch-1
fix: add missing i18n entry
2017-07-15 16:45:53 +00:00
Jeremy Tan
b14b1b51a9 validate->activate 2017-04-23 13:45:25 +02:00
Benoît Latinier
84381f4f48 add: link to the thread 2017-04-23 13:45:25 +02:00
Benoît Latinier
2adb779fef add: edit author/email/website/message 2017-04-23 13:45:25 +02:00
Benoît Latinier
e3fddf4ae8 add: orders in administration 2017-04-23 13:45:24 +02:00
Benoît Latinier
3212bf762f fix 500 error on pagination 2017-04-23 13:45:24 +02:00
Benoît Latinier
0b6a0e4d5f add: group by thread 2017-04-23 13:45:24 +02:00
Benoît Latinier
1516f56cbd fix: cursor pointer on links delete/validate 2017-04-23 13:45:24 +02:00
Benoît Latinier
7a79746f73 add: show author email 2017-04-23 13:45:24 +02:00
Benoît Latinier
0a93c866ff Add a basic admin interface (Fix issue #10)
Add a basic admin interface (Fix issue #10)

wip again

still wip

fix login page
2017-04-23 13:45:24 +02:00
benjhess
e9eebf58e3 Refactored comments unittest to work with optional gravatar feature 2017-04-02 19:48:36 +00:00
benjhess
cbd4d90cb7 Added optional gravatar support 2017-04-02 21:13:06 +02:00
Shengbin Meng
a9500e29dd Add language "zh" as alias of "zh_CN" 2017-03-28 21:56:07 +08:00
Shengbin Meng
4b7a32afac Make the Chinese translations actually work
Before this change, the user must configure `lang="zh"` to use the CN version (neither `lang="zh_CN"` nor `lang="zh_TW"` works).
2017-03-28 21:35:51 +08:00
Pelle Nilsson
45a481daeb Fix require-email setting, #308 2017-03-19 18:42:03 +01:00
Morris Jobke
f33ca31320
Highlight links by underline in comments
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-02-02 11:35:38 -06:00
Mads R. Havmand
cd460ef152 Danish translation 2017-01-07 19:02:00 +01:00
ivegotasthma
09b69feae9 fix: add missing i18n entry
Fixes an indexing error a user gets when he tries to make the language of isso to `bg`
2016-12-17 22:42:07 +01:00
Martin Zimmermann
5e7f010241 add persian to i18n 2016-10-12 09:32:59 +02:00
Aidin Gharibnavaz
5bd7de084f Adding Persian translation. 2016-10-07 19:56:19 +03:30
Martin Zimmermann
eeb091974d add bulgarian translation to i18n.js, #272 2016-09-20 22:16:00 +02:00
Martin Zimmermann
2542acfca8 remove duplicated werkzeug compat middleware
A typo that always chained the legacy middleware although not necessary.
This causes errors with certain configurations (gevent + ???).
2016-09-20 22:00:58 +02:00
Martin Zimmermann
4fc6d5ac33 Merge pull request #263 from gumblex/master
fix "optional" in zh translations
2016-09-20 21:49:25 +02:00
Martin Zimmermann
a52a0862a8 Merge pull request #260 from panta82/vote-levels
Vote levels
2016-09-20 21:49:04 +02:00
Liping Wang
12d85242dc correct offset localtime for comments ago 2016-08-29 18:52:00 +08:00
Dingyuan Wang
c83346834e fix "optional" in zh translations 2016-07-24 13:23:44 +08:00
Martin Zimmermann
689f3b906c Merge remote-tracking branch 'tska/finnish' 2016-07-16 14:22:26 +02:00
Timo Kankare
75371bdd43 Ordered fi after en. 2016-07-16 15:19:02 +03:00
Ivan Pantic
4972433406 Vote levels features (custom classes based on the comment votes) 2016-07-16 04:35:54 +02:00
Ivan Pantic
b0f8606b0f Hiding zero votes is now done through CSS instead of javascript. 2016-07-16 03:54:02 +02:00
Ivan Pantic
b620f2c0b0 Bug when content is number 0. 2016-07-16 03:46:37 +02:00
Timo Kankare
14962ad51f Added fi to i18.n.js. 2016-07-15 10:07:26 +03:00
Timo Kankare
cf20bc5687 Finnish translation. i18n/fi.js added. 2016-07-15 09:41:05 +03:00
Martin Zimmermann
46b2874b3d Merge pull request #252 from blatinier/issue-27/data-attr-overide
Fix issue #27 on override thread discovery with custom data-attributes
2016-07-13 21:06:06 +02:00
Martin Zimmermann
bbff002bd6 Merge pull request #254 from jGleitz/preview
Preview endpoint
2016-07-13 21:04:35 +02:00
Benoît Latinier
459611c0e7 Add an option for mandatory author (Fix issue #124) 2016-07-05 17:28:03 +02:00
Joshua Gleitze
3c9bbda252 preview endpoint 2016-06-03 20:32:39 +02:00
Joshua Gleitze
2a11c000d4 convert bad tabs to spaces 2016-06-03 20:04:58 +02:00
Joshua Gleitze
8a9fe29bce apidoc for count 2016-06-03 14:20:36 +02:00
Joshua Gleitze
afd4107ac3 apidoc for like & dislike 2016-06-03 14:09:16 +02:00
Joshua Gleitze
ded4927ae4 apidoc for moderate 2016-06-03 14:08:57 +02:00
Joshua Gleitze
c3439e5c79 apidoc for "delete comment" 2016-06-03 11:06:46 +02:00
Joshua Gleitze
9b79a98851 apidoc for "edit comment" 2016-06-03 11:06:31 +02:00
Joshua Gleitze
1f804bcf8e apidoc for "view comment" 2016-06-03 10:28:51 +02:00
Joshua Gleitze
b2d9c80b5f apidoc for "new comment" 2016-06-03 10:13:13 +02:00
Joshua Gleitze
5ca5d680fa apidoc for fetch 2016-06-03 10:12:54 +02:00
Benoît Latinier
f1325ccaca Fix issue #27 on override thread discovery with custom data-attributes 2016-06-01 23:02:46 +02:00
Martin Zimmermann
0377c8bb20 fix reponse for OPTIONS response on Python 3, #242 2016-04-12 21:15:22 +02:00
Martin Zimmermann
2612fbc0f5 fix missing wrapper attribute 2016-04-12 21:15:22 +02:00
Sergey Lisakov
2a6aa1203b Fix pluralisation issues and inexact translation
Noticed inexact translation for comment-hidden and no-comments.

Pluralisation had bugs, now it works correctly.
2016-03-25 16:26:47 +01:00
Martin Zimmermann
3cd475ec31 follow redirects, fix #193 2016-02-24 13:14:32 +01:00
Martin Zimmermann
a3a1d8cb86 fix getAttribute return value 2016-02-21 18:55:38 +01:00
Martin Zimmermann
3e309e0850 fix input field value access 2016-02-06 20:02:51 +01:00
smileboy
b48ac000b1 config.js error. 2016-01-30 12:31:58 +01:00
Martin Zimmermann
57f902acd4 actually include isso/defaults.ini 2016-01-09 01:01:39 +01:00
Martin Zimmermann
622b59f8a4 move default config expansion to function body (default already exists) 2016-01-09 00:33:07 +01:00
Martin Zimmermann
93e783ed60 symlink share/isso.conf to isso/defaults.ini and include it properly 2016-01-09 00:15:04 +01:00
Martin Zimmermann
8579cbd6f8 fix undefined variable usage and enumeration logic 2016-01-08 23:03:18 +01:00
Martin Zimmermann
00ed48a1d3 fix incorrect define header 2016-01-08 22:56:45 +01:00
Martin Zimmermann
1f86fa897e add vi (vietnamese) translation, #222 2016-01-08 22:47:13 +01:00
Martin Zimmermann
dd9ebdc46b Merge remote-tracking branch 'origin/pr/222' 2016-01-08 22:42:15 +01:00