Commit Graph

5 Commits (11.0)

Author SHA1 Message Date
Guewen Baconnier bf9fb3a23e Prevent to send web notifications to other users
Only the admin user (sudo) is allowed to send notifications to other
users. The normal users can only send notifications to themselves.

This is to prevent attackers to craft malicious notifications and send
them to other users using RPC.

Correction based on the idea of @hbrunn
2018-10-09 08:30:01 +02:00
Damien Bouvy c1765f97c3 [MIG] web_notify: Migration to 11.0
- Use the 'session' class of the JS Framework (session no lounger bound
to web client)
- Test change: compare emitted & received messages based on content, not
order. Using string comparison raises false positives.
2018-04-03 10:13:42 +01:00
Houzéfa Abbasbhay 92054cf8a7 [10.0][FIX] web_notify tests: Fix an arg check
Fix a check when comparing a user count with items within a mock call.

The previous method was succeeding by pure luck because OCA test
databases contain 2 users, which happens to be the amount of items
within a mock "call_args" (it contains args + kwargs).
2018-04-03 10:13:42 +01:00
Jay Vora(SerpentCS) 9ac7c7c35b [MIG] Migration of web_notify 2018-04-03 10:13:42 +01:00
Laurent Mignon (ACSONE) f2de5d8663 Improve logic and add tests 2018-04-03 10:13:42 +01:00