Bug ID 749142: Portal Access: rewriting for Worker.postMessage(msg,transfer) should not rewrite 2nd argument

Last Modified: Nov 07, 2022

Bug Tracker

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

Known Affected Versions:
11.6.0, 11.6.0 HF1, 11.6.0 HF2, 11.6.0 HF3, 11.6.0 HF4, 11.6.0 HF5, 11.6.0 HF6, 11.6.0 HF7, 11.6.0 HF8, 11.6.1, 11.6.1 HF1, 11.6.1 HF2, 11.6.2, 11.6.2 HF1, 11.6.3, 11.6.3.1, 11.6.3.2, 11.6.3.3, 11.6.3.4, 11.6.4, 11.6.5, 11.6.5.1, 11.6.5.2, 11.6.5.3, 12.1.0, 12.1.0 HF1, 12.1.0 HF2, 12.1.1, 12.1.1 HF1, 12.1.1 HF2, 12.1.2, 12.1.2 HF1, 12.1.2 HF2, 12.1.3, 12.1.3.1, 12.1.3.2, 12.1.3.3, 12.1.3.4, 12.1.3.5, 12.1.3.6, 12.1.3.7, 12.1.4, 12.1.4.1, 12.1.5, 12.1.5.1, 12.1.5.2, 12.1.5.3, 12.1.6, 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.2, 13.1.1.3, 13.1.1.4, 13.1.1.5, 13.1.3, 13.1.3.1, 13.1.3.2, 13.1.3.3, 13.1.3.4, 13.1.3.5, 13.1.3.6, 13.1.4, 13.1.4.1, 13.1.5, 13.1.5.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:
15.0.0

Opened: Nov 07, 2018
Severity: 4-Minor

Symptoms

Using Portal AQccess the browser posts an error message in it's console similar to the following: Failed to execute 'postMessage' on 'Worker': No function was found that matched the signature provided.

Impact

Web-application misfunction

Conditions

Web-application contains javascript code which in turn contains postMessage() to worker with second argument which is array.

Workaround

Custom iRule workaround is possible. For example: # custom workaround for BZs 749142 for specific page when REWRITE_REQUEST_DONE { # path to html page where postMessage is used: if { [HTTP::path] ends_with "/custom_path" } { REWRITE::post_process 1 set sw 2222 } } when REWRITE_RESPONSE_DONE { if {[info exists sw] && $sw == 2222} { unset sw set strt [string first {</head>} [REWRITE::payload]] if {$strt > 0} { REWRITE::payload replace $strt 0 { <script> (function(){ var old_f5_ipm = F5_Invoke_postMessage; // BZ 749142: fix F5_Invoke_postMessage F5_Invoke_postMessage = function () { if ('string' === typeof arguments[2]) { return old_f5_ipm.apply(this, arguments) }else{ return Function.prototype.call.apply(arguments[0].postMessage,arguments); // call source function } } // just a hack to enable unzipped content of Worker for iRule processing (this is impossible for F5CH=I) F5_Invoke_Worker = function () { arguments[1] = F5_WrapURL(arguments[1],"h"); return new Worker(arguments[1]) } })(); </script> } } } }

Fix Information

The issue is fixed.

Behavior Change