Commit graph

698 commits

Author SHA1 Message Date
Glandos
c7ef500dba Preparing release 4.1.5 2020-07-26 21:24:50 +02:00
Baptiste Jonglez
33878028aa Update changelog for 4.1.5 2020-07-26 19:34:23 +02:00
Baptiste Jonglez
bc576f7efd Add test case for CVE-2020-15120
(cherry picked from commit b8f7ce34dd)
2020-07-26 19:34:23 +02:00
Baptiste Jonglez
6460231ff6 Fix crash when trying to get a member from the wrong project
This was hidden by the CVE-2020-15120 issue: now that we no longer return
members from the wrong project, we need to handle the case where there is
nothing to return.

(cherry picked from commit 7fd1828888)
2020-07-26 19:34:23 +02:00
Baptiste Jonglez
9aef13b50c Fix unauthorized access and modification of project data (CVE-2020-15120)
An authenticated member of one project can modify and delete members of
another project, without knowledge of this other project's private
code. This can be further exploited to access all bills of another project
without knowledge of this other project's private code.

With the default configuration, anybody is allowed to create a new
project. An attacker can create a new project and then use it to become
authenticated and exploit this flaw. As such, the exposure is similar to
an unauthenticated attack, because it is trivial to become authenticated.

This issue was caused by a wrong database queries in PersonQuery.

For more details, see https://github.com/spiral-project/ihatemoney/security/advisories/GHSA-67j9-c52g-w2q9

(cherry picked from commit 8d77cf5d56)
2020-07-26 19:34:23 +02:00
Baptiste Jonglez
e87f9f6bcf Update 4.1.5 changelog 2020-07-26 18:39:06 +02:00
zorun
6782c11000 Improve French translation of email templates (#593)
Co-authored-by: Baptiste Jonglez <git@bitsofnetworks.org>
Co-authored-by: Glandos <bugs-github@antipoul.fr>
(cherry picked from commit 21c193710c)
2020-07-26 18:39:06 +02:00
Baptiste Jonglez
abda97d4d3 Add 'pt_BR' and 'ta' to default languages
(cherry picked from commit 29dd0c3d99)
2020-07-26 18:39:06 +02:00
raghupalash
0d25a9677d added 'hi' in SUPPORTED_LANGUAGES list in default_settings.py
(cherry picked from commit 351185b854)
2020-07-26 18:39:06 +02:00
Baptiste Jonglez
cf11b9f3b7 Cleanup translations for hi, pt_BR, ta
This removes strings that are not used in this stable branch.

This is done with:

    pybabel update --ignore-obsolete -i ihatemoney/messages.pot -d ihatemoney/translations/
2020-07-26 18:39:06 +02:00
Baptiste Jonglez
86ace2cf7a Import new translations: hi, ta, pt_BR
This is imported from 21c193710c
2020-07-26 18:39:06 +02:00
Abo7atm
59d41dff29 Change mobile link icon to point to Play Store (#597) (#598)
* Change mobile link icon to point to Play Store (#597)

* Link mobile app button to correct page (#597)

(cherry picked from commit 909ac7e9d6)
2020-07-18 14:37:47 +02:00
kanta
b6f71708f2 Changed @media max-width for .home .card to 450px to make it more responsive
(cherry picked from commit 65988d4993)
2020-07-18 14:37:10 +02:00
Baptiste Jonglez
d4506dee71 Fix typo in changelog to make it consistent with master 2020-07-17 23:13:42 +02:00
Adrien CLERC
5cb6d88468 Back to development: 4.1.5 2020-06-15 22:58:22 +02:00
Adrien CLERC
86d6fc7d4a Preparing release 4.1.4 2020-06-07 22:39:22 +02:00
Baptiste Jonglez
953e1488fc Rebuild translations 2020-06-07 21:22:48 +02:00
Baptiste Jonglez
94563e0c9d Update translations 2020-06-07 21:22:48 +02:00
Baptiste Jonglez
0949a58da8 Fix flake8 warnings: mostly unused imports
Fixes b4f51867b6 ("Fix crash when a localized email template is missing (#592)")
Fixes 38aae77d33 ("Improve error handling when sending emails")
Fixes 77f50e9137 ("Add new tests to check for email failures")
2020-06-07 21:22:48 +02:00
Baptiste Jonglez
99d9159c21 Update Changelog for 4.1.4 2020-06-07 21:22:48 +02:00
Baptiste Jonglez
9f62669144 Fix missing format string in norwegian translation
(cherry picked from commit c752ede74d)
2020-06-07 21:22:48 +02:00
Baptiste Jonglez
b1d241550f Manually fixup string in italian, german, turkish, norwegian 2020-06-07 21:22:48 +02:00
Baptiste Jonglez
98f5826f62 Update and cleanup translations from master (4c8b90b8cc)
Picked just modified translation strings for:

- de
- es_419
- fr

Complete copy (and clean-up) for:

- it
- nb_NO
- tr
- uk
2020-06-07 21:22:48 +02:00
Rajat Singh
b99c2d7809 fixed bug on tool-tip message (#635)
Fix #634

(cherry picked from commit 8d041fdba3)
2020-06-07 21:22:48 +02:00
Rajat Singh
a94d128080 Fix: Change tool-tip message for access code (#623)
Fix #610

(cherry picked from commit 638fc5277c)
2020-06-07 21:22:48 +02:00
Baptiste Jonglez
7980fd2bd9 Rename Chinese translation file so that it gets picked up by Babel (#627) 2020-06-07 21:22:48 +02:00
Baptiste Jonglez
b76da17265 Update Flask-WTF to 0.14.3 to fix python2 - python3 transition
When updating I Hate Money from python2 to python3, any leftover cookie
set from python2 causes the python3 version to crash when reading the
cookie back.

This is a bug/omission in Flask-WTF: https://github.com/lepture/flask-wtf/issues/275

It was fixed in 0.14.3 with: eff54eca0d
2020-06-07 21:22:48 +02:00
Baptiste Jonglez
b690e48e45 Enable new languages to match master: Polish, Chinese, Turkish, Ukrainian 2020-06-07 21:22:48 +02:00
Baptiste Jonglez
e8f36d38c4 Manually fixup translation string that disappeared from master 2020-06-07 21:22:48 +02:00
Baptiste Jonglez
59c7c02c25 Import and cleanup translations from master (23ed467d37)
Cleanup is done with:

    pybabel update --ignore-obsolete -i ihatemoney/messages.pot -d ihatemoney/translations/
2020-06-07 21:22:48 +02:00
Baptiste Jonglez
48f85e0ba2 Update translation sources 2020-06-07 21:22:48 +02:00
Baptiste Jonglez
a4638be144 Simplify send_email(): don't flash messages within this function
Since we have only three places that call send_email() and already several
special cases, it's simpler to just check the return value and flash
messages within the calling code.
2020-06-07 21:22:48 +02:00
Baptiste Jonglez
8d9dc6a61f tests: follow_redirects is now the default for post_project 2020-06-07 21:22:48 +02:00
Baptiste Jonglez
381ea8fe0c tests: Follow redirections by default for post_project()
No user of post_project() was using its return value, so it was not useful
to follow redirections up to now.

However, for new and future usages of post_project(), it's clearer to
follow redirections by default.  Tests can still disable redirects if they
need to test something special.
2020-06-07 21:22:48 +02:00
Baptiste Jonglez
ea0b38933c Fix flake8 check about line length 2020-06-07 21:22:48 +02:00
Baptiste Jonglez
d79eb8ef53 Add new tests to check for email failures 2020-06-07 21:22:48 +02:00
Baptiste Jonglez
119f240da4 Improve existing tests to check for alert notifications 2020-06-07 21:22:48 +02:00
Baptiste Jonglez
0ac6e7266b tests: extend post_project() to optionally follow redirects 2020-06-07 21:22:48 +02:00
Baptiste Jonglez
8edbd42011 Don't display a second success message on password reset 2020-06-07 21:22:48 +02:00
Baptiste Jonglez
5d56ce0ddc Improve error handling when sending emails
In one case, we were not catching socket-related exceptions , and in the
two other cases there was no error handling at all.  Sending emails can
easily fail if no email server is configured, so it is really necessary to
handle these errors instead of crashing with a HTTP 500 error.

Refactor email sending code and add proper error handling.

Show alert messages that tell the user if an email was sent or if there
was an error.

When sending a password reminder email or inviting people by email, don't
proceed to the next step in case of error, because sending emails is the
whole point of these actions.
2020-06-07 21:22:48 +02:00
Baptiste Jonglez
c1b158c728 Add support for different categories of "flash alerts" (#594) 2020-06-07 21:22:48 +02:00
Baptiste Jonglez
2f466b19f7 Update six to 0.14.0 to make tox happy 2020-06-07 21:22:48 +02:00
Baptiste Jonglez
1ddadc020d Cleanup language files by removing unused strings 2020-06-07 21:22:48 +02:00
Baptiste Jonglez
3c9751ff4d Changelog for 4.1.4 2020-06-07 21:22:48 +02:00
Baptiste Jonglez
86c15b4aa4 Pin Werkzeug to 0.16.1
Werkzeug 1.0.0 changed some imports, and this breaks the version of
Flask-Babel we use.  It's been fixed since then, but better keep it safe
by pinning a slightly older version of Werkzeug.
2020-06-07 21:22:48 +02:00
Baptiste Jonglez
96d5e9b730 Update Flask-Migrate to 2.5.3
This fixes a potential issue with database connection that misses the
"charset=utf8" option during migrations: https://github.com/miguelgrinberg/flask-migrate/issues/276
2020-06-07 21:22:48 +02:00
Baptiste Jonglez
e6ada68589 Pin WTForms 2.2.1 (see #567) 2020-06-07 21:22:48 +02:00
Baptiste Jonglez
e37d0a98ff Pin dependencies to ensure that pip will use the exact version of deps
This is a backport / adaptation of 5d3266873e (#558), accounting for the
fact that we are not using setup.cfg.
2020-06-07 21:22:48 +02:00
Baptiste Jonglez
486c584746 Add russian to supported languages 2020-06-07 21:22:48 +02:00
Baptiste Jonglez
e14ffc7147 Import russian translation from master 2020-06-07 21:22:48 +02:00