- 11 Nov, 2024 2 commits
-
-
Jérome Perrin authored
DB.query accepts either bytes or str on python3. We need to decode the query here to display it in traceback and we must not fail when we have bytes with non UTF-8 characters, which can happen with binary columns
-
Jérome Perrin authored
ref: 906761ed (erp5_web: change one-day-max policy max-age to 14400s, 2021-09-01)
-
- 08 Nov, 2024 8 commits
-
-
Romain Courteaud authored
-
Romain Courteaud authored
-
Romain Courteaud authored
-
Romain Courteaud authored
Using the display router command allows to drop the user search term when moving from one access page to another.
-
Romain Courteaud authored
Set the max-age value to 4h instead of 10min for the one-day-max policy (ie, 24h/6, like one-hour-max uses 10min max age). The idea is to reduce backend access of nearly static web sites, while still allowing changes without waiting for too long before it is propagated.
-
Titouan Soulard authored
-
Titouan Soulard authored
-
Titouan Soulard authored
`createSession` method from the OAuth2 Authorisation Server Connector needs to access client value. Fetching this value from the session is not needed since it is already stored in a local variable.
-
- 06 Nov, 2024 1 commit
-
-
Vincent Pelletier authored
Malevolent users may decide to only - and repeatedly - present an otherwise valid refresh token, causing the issuance of a new access tokens everytime, likely along with new refresh tokens, causing many ZODB writes. Avoid this by pushing the token expiration date by one lifespan accuracy, so there can only be one write per session per lifespan accuracy period.
-
- 05 Nov, 2024 6 commits
-
-
Jérome Perrin authored
This partially reverts 8a336dc5 (erp5_accounting: Allow Assignor manage Accounting Periods, 2024-09-16) for the restart transition, it is intentional that only Assignor can restart an accounting period that have been closed. The idea was to support a scenario where re-opening a period that was closed can not be done directly by the Assignee but needs validation from the assignor.
-
Jérome Perrin authored
The check was made on the blob response type, which is set from the Content-Type header returned by the server, but Safari has a different interpretation of the charset parameter from the mime type, with a content type set to application/json;charset=utf-8 like Base_redirect does today, safari creates a blob with type application/json;charset=utf-8 and this was not detected as redirection and the json returned by Base_redirect was downloaded. Fix this by checking only the essence of the type. This also revealed a potential problem when actually downloading json files, in that case we also check that we have the X-Location header, that is supposed to be set by Base_redirect before interpreting the json and when it's not present we force download.
-
Jérome Perrin authored
Follow up of ff624fd2 (ERP5Workflow: newly added permission should be acquired for all existing states., 2024-11-04) and cbef6282 (ERP5Workflow: make sure not create duplicate permissions, 2024-11-05)
-
Jérome Perrin authored
Fix a problem introduced in ff624fd2 (ERP5Workflow: newly added permission should be acquired for all existing states., 2024-11-04), visible in a test failure
-
Jérome Perrin authored
-
Jérome Perrin authored
-
- 04 Nov, 2024 4 commits
-
-
Roque authored
-
Kazuhiko Shiozaki authored
before, all permissions became acquired in all states once we update permission list.
-
Kazuhiko Shiozaki authored
-
- 01 Nov, 2024 2 commits
- 30 Oct, 2024 1 commit
-
-
Rafael Monnerat authored
Don't add to total_contribution_relief if employer price is not set (None).
-
- 29 Oct, 2024 1 commit
-
-
Jérome Perrin authored
It was not running because we had two methods with same name
-
- 28 Oct, 2024 1 commit
-
-
Jérome Perrin authored
This reverts commit 5e21f77f. This was done too quickly based on a wrong assumption that simulation movements to build would always be in planned state and that we could have an efficient way of selecting them by catalog with index on portal_type and simulation state, but it does not work this way. Maybe the change is useful for something else, but since we don't have any use case for now, let's just revert.
-
- 25 Oct, 2024 1 commit
-
-
Jérome Perrin authored
See merge request !2001
-
- 24 Oct, 2024 7 commits
-
-
Jérome Perrin authored
See merge request !2003
-
Jérome Perrin authored
-
Jérome Perrin authored
-
Jérome Perrin authored
-
Jérome Perrin authored
-
Jérome Perrin authored
-
Jérome Perrin authored
In 1b555dbf (py2/py3: Make Products code compatible with both python2 and python3 (!1751)., 2024-07-16) we changed the code in a way that on python2 it would first node text to a python2 str and only later convert it to unicode, but setting text to a str during the first step can fail with: ValueError: All strings must be XML compatible: Unicode or ASCII, no NULL bytes or control characters This change to set directly unicode on py2.
-
- 23 Oct, 2024 4 commits
-
-
Romain Courteaud authored
-
Jérome Perrin authored
and move the implementation of SimulationMovement.getSimulationState here. This makes it possible for rules to generate simulation movements that are not necessary planned.
-
Jérome Perrin authored
Applied rules must have a rule as specialise
-
Jérome Perrin authored
-
- 16 Oct, 2024 2 commits
-
-
Jérome Perrin authored
`sender@customer.com <sender@customer.com>` used in the test is not a valid email address. We have updated to python3.9.20 which comes with a fix for CVE-2023-27043 and no longer allow this kind of broken addresses. Replace the address with a similar valid address, `"sender@customer.com" <sender@customer.com>`, that was probably the original intention of this test.
-
Jérome Perrin authored
On python3, the type of selected columns depend on the data type from mariadb side, VARCHAR will be str, BINARY/BLOB will be bytes, etc These SQL method select path that is first evaluated from a variable that is NULL and in that case, mariadb seems to select LONGBLOB as data type: MariaDB [test]> set @defined_as_null=null; drop table if exists tmp; create table tmp as (select @defined_as_null); show create table tmp; +-------+------------------------------------------------------------------------------------------------------------------------------------+ | Table | Create Table | +-------+------------------------------------------------------------------------------------------------------------------------------------+ | tmp | CREATE TABLE `tmp` ( `@defined_as_null` longblob DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci | +-------+------------------------------------------------------------------------------------------------------------------------------------+ By casting to CHAR in SQL, on the python side we always have the str that we expect here, because this is used as path attribute of a SQL brain.
-