Openbravo Issue Tracking System - Openbravo ERP | ||||||||||||
View Issue Details | ||||||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | |||||||
0037627 | Openbravo ERP | A. Platform | public | 2018-01-12 11:19 | 2018-02-22 18:18 | |||||||
Reporter | malsasua | |||||||||||
Assigned To | jarmendariz | |||||||||||
Priority | normal | Severity | major | Reproducibility | always | |||||||
Status | closed | Resolution | fixed | |||||||||
Platform | OS | 5 | OS Version | |||||||||
Product Version | ||||||||||||
Target Version | Fixed in Version | 3.0PR18Q2 | ||||||||||
Merge Request Status | ||||||||||||
Review Assigned To | caristu | |||||||||||
OBNetwork customer | OBPS | |||||||||||
Web browser | ||||||||||||
Modules | Core | |||||||||||
Support ticket | ||||||||||||
Regression level | ||||||||||||
Regression date | ||||||||||||
Regression introduced in release | ||||||||||||
Regression introduced by commit | ||||||||||||
Triggers an Emergency Pack | No | |||||||||||
Summary | 0037627: AllowedCrossDomainsHandler.getInstance().setCORSHeaders is not executed calling to WebServices | |||||||||||
Description | If a call to one WebService is done using ajax, the AllowedCrossDomainsHandler.getInstance().setCORSHeaders is not executed, and error "No 'Access-Control-Allow-Origin'" is returned | |||||||||||
Steps To Reproduce | . implement class that it extends from AllowedCrossDomainsChecker (see [1] and attached class file) . do a call to one WS using ajax or JS from Chrome developers tools, opening the page: jsbeautifier.org: . open chrome: url: http://jsbeautifier.org/ [^] . open chrome developers tools . execute in the console, this command: prueba = function () { var xhr = new XMLHttpRequest(); xhr.open("GET","http://localhost:8080/openbravo/ws/dal/Country?user=Openbravo&password=openbravo" [^]); xhr.setRequestHeader('Content-Type', "appliation/json;charset=UTF-8"); xhr.send(); }; prueba(); Error is returned: Failed to load http://localhost:8080/openbravo/ws/dal/Country?user=Openbravo&password=openbravo: [^] Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://jsbeautifier.org' [^] is therefore not allowed access. [1] http://wiki.openbravo.com/wiki/Retail:Configuration_Guide#Allowed_Origin_Domains_Field_-_Cross_Domain_Requests [^] | |||||||||||
Proposed Solution | file: /src/org/openbravo/service/web/BaseWebServiceServlet.java add in line 71: AllowedCrossDomainsHandler.getInstance().setCORSHeaders(request, response); | |||||||||||
Additional Information | ||||||||||||
Tags | No tags attached. | |||||||||||
Relationships |
| |||||||||||
Attached Files | ![]() https://issues.openbravo.com/file_download.php?file_id=11451&type=bug ![]() https://issues.openbravo.com/file_download.php?file_id=11492&type=bug | |||||||||||
Issue History | ||||||||||||
Date Modified | Username | Field | Change | |||||||||
2018-01-12 11:19 | malsasua | New Issue | ||||||||||
2018-01-12 11:19 | malsasua | Assigned To | => platform | |||||||||
2018-01-12 11:19 | malsasua | File Added: ZendeskAllowedDomain.java | ||||||||||
2018-01-12 11:19 | malsasua | OBNetwork customer | => Yes | |||||||||
2018-01-12 11:19 | malsasua | Modules | => Core | |||||||||
2018-01-12 11:19 | malsasua | Resolution time | => 1517612400 | |||||||||
2018-01-12 11:19 | malsasua | Triggers an Emergency Pack | => No | |||||||||
2018-01-19 12:12 | alostale | Status | new => acknowledged | |||||||||
2018-01-22 17:53 | jarmendariz | Assigned To | platform => jarmendariz | |||||||||
2018-01-22 17:53 | jarmendariz | Status | acknowledged => scheduled | |||||||||
2018-01-26 09:42 | jarmendariz | File Added: bug-37627.patch | ||||||||||
2018-01-26 09:48 | jarmendariz | Review Assigned To | => caristu | |||||||||
2018-01-26 14:54 | caristu | Relationship added | related to 0034331 | |||||||||
2018-02-02 10:08 | hgbot | Checkin | ||||||||||
2018-02-02 10:08 | hgbot | Note Added: 0102144 | ||||||||||
2018-02-02 10:08 | hgbot | Status | scheduled => resolved | |||||||||
2018-02-02 10:08 | hgbot | Resolution | open => fixed | |||||||||
2018-02-02 10:08 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/devel/pi/rev/31ed5cfcd28514f458237d536f97ef584ec9e56a [^] | |||||||||
2018-02-02 12:06 | caristu | Note Added: 0102152 | ||||||||||
2018-02-02 12:06 | caristu | Status | resolved => closed | |||||||||
2018-02-02 12:06 | caristu | Fixed in Version | => 3.0PR18Q2 | |||||||||
2018-02-22 18:18 | hudsonbot | Checkin | ||||||||||
2018-02-22 18:18 | hudsonbot | Note Added: 0102711 |
Notes | |||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|