Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0055012Openbravo ERPA. Platformpublic2024-03-20 14:142024-04-09 09:27
nicola_uva 
meriem_azaf 
immediatemajoralways
closedfixed 
5
pi 
piPR24Q3 
Core
QA functional test
2024-02-26
pi
https://gitlab.com/openbravo/product/openbravo/-/commit/01c9d899e4fab5431f3ab1d2d87c92297fcf464d [^]
No
0055012: Business API Data Load window: Not possible to load the data - InvalidCSRFToken
Is not possible load data through the Business API Data Load window. An InvalidCSRFToken error message is showed in the log.
1) go to https://livebuilds.openbravo.com/context/retail_pos2_modules_pgsql [^]
2) open the window Business API Data Load
3) select the entity you want to load (e.i Gifcard) and load the csv file
4) click "Done" button -> an ERROR is showed. See the log attached
No tags attached.
depends on backport 0055126PR24Q2 closed meriem_azaf Business API Data Load window: Not possible to load the data - InvalidCSRFToken 
caused by defect 0051321 closed jarmendariz Improve CSRF coverage to cover some missing POST requests 
causes defect 0055542 closed Triage Platform Base Error when trying to import data from CSV file to an entity with the Business API Data Load process 
log InvalidCSRFToken.log (6,612) 2024-03-20 14:14
https://issues.openbravo.com/file_download.php?file_id=19572&type=bug
Issue History
2024-03-20 14:14nicola_uvaNew Issue
2024-03-20 14:14nicola_uvaAssigned To => Triage Platform Base
2024-03-20 14:14nicola_uvaFile Added: InvalidCSRFToken.log
2024-03-20 14:14nicola_uvaModules => Core
2024-03-20 14:14nicola_uvaTriggers an Emergency Pack => No
2024-03-20 14:17alostaleAssigned ToTriage Platform Base => Triage Platform Conn
2024-03-22 09:15AugustoMauchRegression level => QA functional test
2024-03-22 09:15AugustoMauchRegression date => 2024-02-26
2024-03-22 09:15AugustoMauchRegression introduced in release => pi
2024-03-22 09:15AugustoMauchRegression introduced by commit => https://gitlab.com/openbravo/product/openbravo/-/commit/01c9d899e4fab5431f3ab1d2d87c92297fcf464d [^]
2024-03-22 09:16AugustoMauchNote Added: 0162533
2024-03-22 09:16AugustoMauchAssigned ToTriage Platform Conn => meriem_azaf
2024-03-22 09:19AugustoMauchNote Edited: 0162533bug_revision_view_page.php?bugnote_id=0162533#r27725
2024-03-22 11:05hgbotNote Added: 0162544
2024-03-22 11:35alostaleRelationship addedcaused by 0051321
2024-04-08 14:04meriem_azafStatusnew => scheduled
2024-04-09 09:27hgbotNote Added: 0162951
2024-04-09 09:27hgbotResolutionopen => fixed
2024-04-09 09:27hgbotStatusscheduled => closed
2024-04-09 09:27hgbotFixed in Version => PR24Q3
2024-04-09 09:27hgbotNote Added: 0162952
2024-05-21 17:04caristuRelationship addedcauses 0055542

Notes
(0162533)
AugustoMauch   
2024-03-22 09:16   
(edited on: 2024-03-22 09:19)
Missing csrfToken in request: add [1] here [2]

[1] formData.append('csrfToken', OB.User.csrfToken)

[2] https://gitlab.com/openbravo/product/openbravo/-/blob/master/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/process/ob-parameter-window-view.js?ref_type=heads#L490 [^]

(0162544)
hgbot   
2024-03-22 11:05   
Merge Request created: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/1178 [^]
(0162951)
hgbot   
2024-04-09 09:27   
Merge request merged: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/1178 [^]
(0162952)
hgbot   
2024-04-09 09:27   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/openbravo [^]
Changeset: 7aecbb28ae54e0cdbdd3570a064a4f54c521b33e
Author: Meriem Azaf <m.azaf@orisha.com>
Date: 09-04-2024 07:27:13
URL: https://gitlab.com/openbravo/product/openbravo/-/commit/7aecbb28ae54e0cdbdd3570a064a4f54c521b33e [^]

Fixes ISSUE-0055012: Problem in loading the data in BUsiness API Data Load window

Problem in loading data through the Business API Data Load window. An InvalidCSRFToken error message is showed in the log.

The problem is that now we are checking that the csrfToken parameter of POST requests, but we missed to include the CSRF token in one of them. So we include it.

---
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/process/ob-parameter-window-view.js
---