Bug ID 708879: [PA] F5_Deflate_location() wrapper should return object with all properties of source location object

Last Modified: Nov 06, 2019

Bug Tracker

Affected Product:  See more info
BIG-IP APM(all modules)

Known Affected Versions:
13.0.0, 13.0.0 HF1, 13.0.0 HF2, 13.0.0 HF3, 13.0.1, 13.1.0, 13.1.0.1, 13.1.0.2, 13.1.0.3, 13.1.0.4, 13.1.0.5, 13.1.0.6, 13.1.0.7, 13.1.0.8, 13.1.1, 13.1.1.1, 13.1.1.2, 13.1.1.3, 13.1.1.4, 13.1.1.5, 13.1.3, 13.1.3.1, 14.0.0, 14.0.0.1, 14.0.0.2, 14.0.0.3, 14.0.0.4, 14.0.0.5, 14.0.1, 14.0.1.1

Fixed In:
14.1.0

Opened: Mar 05, 2018
Severity: 4-Minor

Symptoms

Web-application receives the incorrect value in its variable.

Impact

Not all properties of source location object are included in the response. The JavaScript becomes: l = /*F5_*/ F5_identity((!F5_isLink(location))?location: F5_Deflate_location(F5_document)) /*_5F#location#*/ ; // usual location, like http://host/path hasHostname = ('string' == typeof l.hostname); and it produce hasHostname === false, while it should be true. Web-application might not operate as expected, for example, failures might be reported when success should occur. Note: The F5_Deflate_location() function is one of the internal functions used to wrap variables/properties in web-application code, and it exists only in JavaScript code rewritten by the BIG-IP system for purpose of reverse-proxy functionality.

Conditions

-- A Portal Access (PA) web-application containing JavaScript code similar to the following: l = location; // usual location, like http://host/path hasHostname = ('string' == typeof l.hostname); -- Requesting a rewrite.

Workaround

Use a custom iRule to correct the value in the web-application HTML page, where the issue occurs. For example, here is an iRule intended to replace the F5_Deflate_location() function with the correct value on HTML pages where the issue was detected. (Such files are selected by following line in the iRule: [HTTP::path] equals "/hub/".) when REWRITE_REQUEST_DONE { if { [HTTP::path] equals "/hub/" } { # log "URI=([HTTP::path])" # Found the file we wanted to modify REWRITE::post_process 1 } } when REWRITE_RESPONSE_DONE { set strt [string first {<script>try} [REWRITE::payload]] if {$strt > 0} { REWRITE::payload replace $strt 0 { <script> (function () { var dl = F5_Deflate_location; F5_Deflate_location = function (o) { var l = dl(o); for (var i in window.location) { if (! (i in l)) { l[i] = window.location[i]; } } return l; } })(); </script> } } }

Fix Information

The system returns deflate object with all of the correct properties of the source location.

Behavior Change