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
```
7 years ago
Shengbin Meng
2f7d6aa09b
Merge branch 'master' into patch-1
7 years ago
Jelmer Vernooij
71bda25568
Merge pull request #312 from pellenilsson/fix-require-email
...
Fix require-email setting
7 years ago
Jelmer Vernooij
c8e4e74514
Merge pull request #335 from philipcmonk/time
...
Display only complete units of time
7 years ago
Jelmer Vernooij
afbcb6413e
Add da entry to i18n.js.
7 years ago
Jelmer Vernooij
6006cd9e82
Merge Danish translation from https://github.com/MadsRC/isso
7 years ago
Philip Monk
26f0e06e78
display only complete units of time
...
fixes #283
7 years ago
benjhess
cbd4d90cb7
Added optional gravatar support
7 years ago
Shengbin Meng
a9500e29dd
Add language "zh" as alias of "zh_CN"
7 years ago
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).
7 years ago
Pelle Nilsson
45a481daeb
Fix require-email setting, #308
7 years ago
Mads R. Havmand
cd460ef152
Danish translation
8 years ago
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`
8 years ago
Martin Zimmermann
5e7f010241
add persian to i18n
8 years ago
Aidin Gharibnavaz
5bd7de084f
Adding Persian translation.
8 years ago
Martin Zimmermann
eeb091974d
add bulgarian translation to i18n.js, #272
8 years ago
Martin Zimmermann
4fc6d5ac33
Merge pull request #263 from gumblex/master
...
fix "optional" in zh translations
8 years ago
Martin Zimmermann
a52a0862a8
Merge pull request #260 from panta82/vote-levels
...
Vote levels
8 years ago
Liping Wang
12d85242dc
correct offset localtime for comments ago
8 years ago
Dingyuan Wang
c83346834e
fix "optional" in zh translations
8 years ago
Martin Zimmermann
689f3b906c
Merge remote-tracking branch 'tska/finnish'
8 years ago
Timo Kankare
75371bdd43
Ordered fi after en.
8 years ago
Ivan Pantic
4972433406
Vote levels features (custom classes based on the comment votes)
8 years ago
Ivan Pantic
b0f8606b0f
Hiding zero votes is now done through CSS instead of javascript.
8 years ago
Ivan Pantic
b620f2c0b0
Bug when content is number 0.
8 years ago
Timo Kankare
14962ad51f
Added fi to i18.n.js.
8 years ago
Timo Kankare
cf20bc5687
Finnish translation. i18n/fi.js added.
8 years ago
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
8 years ago
Benoît Latinier
459611c0e7
Add an option for mandatory author (Fix issue #124 )
8 years ago
Benoît Latinier
f1325ccaca
Fix issue #27 on override thread discovery with custom data-attributes
8 years ago
Martin Zimmermann
2612fbc0f5
fix missing wrapper attribute
8 years ago
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.
8 years ago
Martin Zimmermann
a3a1d8cb86
fix getAttribute return value
8 years ago
Martin Zimmermann
3e309e0850
fix input field value access
8 years ago
smileboy
b48ac000b1
config.js error.
8 years ago
Martin Zimmermann
00ed48a1d3
fix incorrect define header
9 years ago
Martin Zimmermann
1f86fa897e
add vi (vietnamese) translation, #222
9 years ago
Martin Zimmermann
dd9ebdc46b
Merge remote-tracking branch 'origin/pr/222'
9 years ago
Martin Zimmermann
815c7f54b5
add hr (croatian) translation
9 years ago
Martin Zimmermann
dc1d83b74b
add cs (czech) translation
9 years ago
Martin Zimmermann
2e41c4728a
don't extend native objects, #191
9 years ago
Đinh Xuân Sâm
5ce7084f59
Fix typo: s/trướ/trước
9 years ago
Đinh Xuân Sâm
f1a8aed320
Completed Vietnamese translation.
9 years ago
Đinh Xuân Sâm
17747368e1
Created new branch for translation: vietnamese.
...
Added Vietnamese translation.
9 years ago
Martin Zimmermann
33c02b45b4
Merge remote-tracking branch 'origin/pr/202'
9 years ago
Martin Zimmermann
54952e67ad
Merge remote-tracking branch 'origin/pr/199'
9 years ago
Sergey Lisakov
45c4e43ba2
Update ru.js
9 years ago
Sergey Lisakov
11dff33450
Update ru.js
9 years ago
Sergey Lisakov
ed0f680e97
Update Russian translation
...
Pluralization will work just fine now with Russian. Also I corrected several typos and added translation for missed "comment-hidden". I installed Isso via pip and have this part of code in other files.
9 years ago
Nick Hu
cb21af4cc5
Add config for requiring emails
9 years ago
Mushiyo
2af17b6204
corrected punctuation
9 years ago
Mushiyo
19179b1764
modify to a better translation
9 years ago
Mushiyo
b98133836d
Added zh_TW translation
9 years ago
Martin Zimmermann
8018a7e23d
update russian translation
9 years ago
wendal
6e4d9ba446
add: zh_CN Translation
9 years ago
Martin Zimmermann
630e76f66c
Merge branch 'legacy/0.9'
...
Conflicts:
CHANGES.rst
isso/ext/notifications.py
isso/utils/http.py
setup.py
9 years ago
Sergey
56c81c2d06
Update ru.js
9 years ago
Martin Zimmermann
957fc72eb1
reject request if reject is actually defined, fix #165
9 years ago
Martin Zimmermann
0466977109
replace bullet with HTML entity, fix #169
9 years ago
Martin Zimmermann
4c9a2aba30
fetch polish translation
9 years ago
Martin Zimmermann
26b889d381
Merge remote-tracking branch 'origin/pr/157'
...
Conflicts:
isso/js/app/i18n.js
10 years ago
Matias
c5496b103d
Added spanish translation
...
Added spanish translation
10 years ago
Matias
4d7fc956ab
Create es.js
...
Added spanish translation
10 years ago
Martin Zimmermann
e271851b50
fetch greek translation
10 years ago
Jelmer Vernooij
00c4d4149e
Import transifex improvements to Dutch translation.
10 years ago
Jelmer Vernooij
dcb7f6457c
Add Dutch translations.
10 years ago
Martin Zimmermann
d70eb160b9
Merge branch 'legacy/0.9'
...
Conflicts:
isso/migrate.py
10 years ago
Martin Zimmermann
d6602b7fe4
Merge branch 'pr/143'
10 years ago
Martin Zimmermann
7f5ff457c1
integrate swedish translation into Isso
10 years ago
Martin Zimmermann
b45f39e662
resolve when comment is in moderation queue, too
10 years ago
Théo Zimmermann
bba91b3f93
don't lose comment if it failed to create
10 years ago
Gustav Näslund
da47dbd374
Added swedish translation file
10 years ago
Martin Zimmermann
4b97684e22
fix editing when avatars are disabled
10 years ago
Martin Zimmermann
928198f340
update translations
10 years ago
Martin Zimmermann
f0a0f40223
add fallback localStorage implementation if not functional, #134
10 years ago
Théo Zimmermann
d0a0ac39b0
bug fixed: was trying to remove an unexisting span.votes
10 years ago
Martin Zimmermann
721e87a843
Merge branch 'legacy/0.9'
...
Conflicts:
CHANGES.rst
docs/docs/configuration/client.rst
setup.py
10 years ago
Martin Zimmermann
c712d196d7
add option to hide voting feature, closes #115
10 years ago
Martin Zimmermann
d21aed83f8
save name, email and website in localStorage, closes #119
10 years ago
Martin Zimmermann
d9098b83f0
use different identifiers to avoid mixin events
10 years ago
Martin Zimmermann
f7e51fd03d
Merge branch 'legacy/0.9'
...
Conflicts:
CHANGES.rst
isso/core.py
setup.py
10 years ago
Martin Zimmermann
881788a049
fix <time> semantics and add title attribute, closes #104
...
The browser shows a human-readable, absolute timestamp when hovering the
"time ago" element
10 years ago
Martin Zimmermann
8a58afc8e6
fix order of converting HTML back to text
...
Fixes a regression introduced by ad9384e
, which escapes wanted line
breaks, such as <br /> and <div>.
10 years ago
Martin Zimmermann
7008e88314
prevent insertion, closes #112
10 years ago
Martin Zimmermann
7701dafa13
remove old Markup.js module
10 years ago
Martin Zimmermann
57d4380106
fix french 'date-now'
10 years ago
Martin Zimmermann
ad9384e8d7
preserve HTML tags while editing comments
10 years ago
Martin Zimmermann
0c8ec38dda
don't scrollIntoView on expanding comments
...
A regression introduced in 94ee6a69
10 years ago
Martin Zimmermann
fbb55bf38a
add esperanto translation
10 years ago
Martin Zimmermann
d2644c3ba3
increase Copyright year
10 years ago
Martin Zimmermann
64054ec029
remove unused code, fix pyflakes and jshint hints
10 years ago
Martin Zimmermann
94ee6a6981
use el.on("click") to load more comments and prevent default
10 years ago
Martin Zimmermann
d0a50c7905
fix french translation
10 years ago
Martin Zimmermann
2d37637019
add fr and de translation for postbox-website, fix french translation
10 years ago
Martin Zimmermann
96206b110c
fix pagination translations and pluralization
...
If a message does not contain '\n', pluralize is not called. Also
replace {{ hidden_replies }} with {{ n }}.
10 years ago
Martin Zimmermann
5d3f178fca
remove debug statement
10 years ago
Martin Zimmermann
96620e8cd0
rename .postbox to .isso-postbox
10 years ago
Martin Zimmermann
165caa9620
show all top-level comments (for now)
...
There is a bug, when you hide N top-level comments, that shows the wrong
comment count. With a JSON API like data structure, the total comment
count can be sent as a different key, related to #96 .
10 years ago
Martin Zimmermann
8fefe3a616
fix hidden reply to deleted comment (and change a few names)
10 years ago
Martin Zimmermann
6bfd1344ba
Merge branch 'remove-avatar-preview'
10 years ago