Files
ofbiz-framework/applications/order/widget/ordermgr/OrderPrintScreens.xml
T
Jacques Le Roux 4f841e9897 Fixed: IDOR vulnerability in the order processing feature in ecommerce component (OFBIZ-11836)
https://demo-stable.ofbiz.apache.org/ecommerce/control/order.pdf?orderId=WSCO10000

In the above URL, the parameter 'orderId' has the value 'WSCO10000' and after
incrementing the value to 'WSCO10001' or 'WSCO10002' will download the receipt
of other orders which have been placed by other users.

All the available order receipts can be downloaded by running an automated tool
(Burp Intruder) on the parameter 'orderId=WSCOXXXXX'

I have successfully tested this by using 2 different accounts: DemoCustomer and
DemoCustomer2

An attacker can download order receipts of other users and this could lead to
information disclosure.

The only real solution to this issue is to implement access control. The user
needs to be authorized for the requested information before the server provides
it.

Thanks: Harshit Shukla [mailto:harshit.shukz@gmail.com]reported this IDOR
vulnerability to the OFBiz security team, and we thank him for that.
2020-06-26 09:28:49 +02:00

191 lines
10 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
<!-- These forms are for generating printed documents, such as invoices, bills, statements, etc. -->
<screens xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://ofbiz.apache.org/Widget-Screen" xsi:schemaLocation="http://ofbiz.apache.org/Widget-Screen http://ofbiz.apache.org/dtds/widget-screen.xsd">
<!-- generate a PDF for the order, sharing the same groovy file as the HTML page for viewing the order -->
<screen name="OrderPDF">
<section>
<actions>
<set field="titleProperty" value="OrderOrder" />
<property-map resource="OrderUiLabels" map-name="uiLabelMap" global="true" />
<property-map resource="AccountingUiLabels" map-name="uiLabelMap" global="true" />
<property-map resource="ProductUiLabels" map-name="uiLabelMap" global="true" />
<script location="component://order/groovyScripts/order/OrderView.groovy" />
<script location="component://order/groovyScripts/order/OrderViewWebSecure.groovy" />
</actions>
<widgets>
<section>
<condition>
<if-compare operator="equals" value="true" field="hasPermission" />
</condition>
<widgets>
<decorator-screen name="FoReportDecorator" location="component://common/widget/CommonScreens.xml">
<!-- at the top left of every page we put the logo and company information -->
<decorator-section name="topLeft">
<section>
<widgets>
<include-screen name="CompanyLogo" location="component://order/widget/ordermgr/OrderPrintScreens.xml" />
</widgets>
</section>
</decorator-section>
<!-- at the top right of every page we put the order information -->
<decorator-section name="topRight">
<section>
<widgets>
<platform-specific>
<xsl-fo>
<html-template location="component://order/template/order/OrderReportHeaderInfo.fo.ftl" />
</xsl-fo>
</platform-specific>
</widgets>
</section>
</decorator-section>
<decorator-section name="body">
<section>
<widgets>
<!-- the contach mechanisms, terms, payment and shipping methods are shown in the first page -->
<platform-specific>
<xsl-fo>
<html-template location="component://order/template/order/OrderReportContactMechs.fo.ftl" />
</xsl-fo>
</platform-specific>
<!-- order items and totals -->
<platform-specific>
<xsl-fo>
<html-template location="component://order/template/order/OrderReportBody.fo.ftl" />
</xsl-fo>
</platform-specific>
<!-- return policies and notes are shown in the last page -->
<platform-specific>
<xsl-fo>
<html-template location="component://order/template/order/OrderReportConditions.fo.ftl" />
</xsl-fo>
</platform-specific>
</widgets>
</section>
</decorator-section>
</decorator-screen>
</widgets>
</section>
</widgets>
</section>
</screen>
<screen name="CompanyLogo">
<section>
<actions>
<script location="component://order/groovyScripts/order/CompanyHeader.groovy"/>
</actions>
<widgets>
<platform-specific><xsl-fo><html-template location="component://order/template/order/CompanyHeader.fo.ftl"/></xsl-fo></platform-specific>
</widgets>
</section>
</screen>
<screen name="ReturnPDF">
<section>
<actions>
<set field="titleProperty" value="OrderOrderReturn"/>
<property-map resource="OrderUiLabels" map-name="uiLabelMap" global="true"/>
<property-map resource="AccountingUiLabels" map-name="uiLabelMap" global="true"/>
<property-map resource="ProductUiLabels" map-name="uiLabelMap" global="true"/>
<script location="component://order/groovyScripts/return/ReturnHeader.groovy"/>
<script location="component://order/groovyScripts/return/ReturnItems.groovy"/>
</actions>
<widgets>
<decorator-screen name="FoReportDecorator" location="component://common/widget/CommonScreens.xml">
<!-- at the top left of every page we put the logo and company information -->
<decorator-section name="topLeft">
<section>
<widgets>
<include-screen name="CompanyLogo" location="component://order/widget/ordermgr/OrderPrintScreens.xml"/>
</widgets>
</section>
</decorator-section>
<!-- at the top right of every page we put the order information -->
<decorator-section name="topRight">
<section>
<widgets>
<platform-specific>
<xsl-fo><html-template location="component://order/template/return/ReturnReportHeaderInfo.fo.ftl"/></xsl-fo>
</platform-specific>
</widgets>
</section>
</decorator-section>
<decorator-section name="body">
<section>
<widgets>
<!-- the contach mechanisms, terms, payment and shipping methods are shown in the first page -->
<platform-specific>
<xsl-fo><html-template location="component://order/template/return/ReturnReportContactMechs.fo.ftl"/></xsl-fo>
</platform-specific>
<!-- order items and totals -->
<platform-specific>
<xsl-fo><html-template location="component://order/template/return/ReturnReportBody.fo.ftl"/></xsl-fo>
</platform-specific>
<!-- return policies and notes are shown in the last page -->
<platform-specific>
<xsl-fo><html-template location="component://order/template/return/ReturnReportConditions.fo.ftl"/></xsl-fo>
</platform-specific>
</widgets>
</section>
</decorator-section>
</decorator-screen>
</widgets>
</section>
</screen>
<screen name="ShipGroupsPDF">
<section>
<actions>
<set field="titleProperty" value="OrderShipGroups"/>
<property-map resource="OrderUiLabels" map-name="uiLabelMap" global="true"/>
<property-map resource="ProductUiLabels" map-name="uiLabelMap" global="true"/>
<script location="component://order/groovyScripts/order/ShipGroups.groovy"/>
</actions>
<widgets>
<decorator-screen name="FoReportDecorator" location="component://common/widget/CommonScreens.xml">
<!-- at the top left of every page we put the logo and company information -->
<decorator-section name="topLeft">
<section>
<widgets>
<include-screen name="CompanyLogo" location="component://order/widget/ordermgr/OrderPrintScreens.xml"/>
</widgets>
</section>
</decorator-section>
<decorator-section name="body">
<section>
<widgets>
<platform-specific>
<xsl-fo><html-template location="component://order/template/order/ShipGroups.fo.ftl"/></xsl-fo>
</platform-specific>
</widgets>
</section>
</decorator-section>
</decorator-screen>
</widgets>
</section>
</screen>
</screens>