[PAGES-539] Ignore postMessages which do not specify a page editor action Created: 30/Nov/21  Updated: 17/Feb/22  Resolved: 03/Dec/21

Status: Closed
Project: Magnolia pages module
Component/s: None
Affects Version/s: None
Fix Version/s: 6.2.13

Type: Improvement Priority: Neutral
Reporter: Robert Šiška Assignee: Robert Šiška
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: 0d
Time Spent: 3.5h
Original Estimate: Not Specified

Template:
Acceptance criteria:
Empty
Task DoD:
[X]* Doc/release notes changes? Comment present?
[X]* Downstream builds green?
[X]* Solution information and context easily available?
[X]* Tests
[X]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Date of First Response:
Epic Link: External SPA
Sprint: HL & LD 41
Story Points: 1

 Description   

Some frameworks or even browser extensions can produce postMessages which break our server-side postMessage handler.

Sanitize by checking if the postMessage object contains action property with a proper action type set.

 

Symptoms:

Problem occurs when using Angular project with angular-editor 1.2.0-beta, doing external SPA (with baseURL and routeTemplate) on FIrefox (not reproducable on Chrome)

Upon saving a change to a component in page editor - browser console shows exception:

com.google.gwt.logging.client.LogConfiguration
SEVERE: (TypeError) : ji2.uncheckedCast(...).charCodeAt is not a function
com.google.gwt.core.client.JavaScriptException: (TypeError) : ji2.uncheckedCast(...).charCodeAt is not a function
	at Unknown.split_2(http://localhost:8080/VAADIN/widgetsets/info.magnolia.PageEditor/info.magnolia.PageEditor.nocache.js)
	at Unknown.decode(http://localhost:8080/VAADIN/widgetsets/info.magnolia.PageEditor/info.magnolia.PageEditor.nocache.js)
	at Unknown.handleMessage(http://localhost:8080/VAADIN/widgetsets/info.magnolia.PageEditor/info.magnolia.PageEditor.nocache.js)
	at Unknown.$addMessageHandler/receiver<(http://localhost:8080/VAADIN/widgetsets/info.magnolia.PageEditor/info.magnolia.PageEditor.nocache.js)
	at Unknown.apply_0(http://localhost:8080/VAADIN/widgetsets/info.magnolia.PageEditor/info.magnolia.PageEditor.nocache.js)
	at Unknown.entry0(http://localhost:8080/VAADIN/widgetsets/info.magnolia.PageEditor/info.magnolia.PageEditor.nocache.js)
	at Unknown.entry_0/<(http://localhost:8080/VAADIN/widgetsets/info.magnolia.PageEditor/info.magnolia.PageEditor.nocache.js)
	at Unknown.invokeTask(http://localhost:4200/polyfills.js)
	at Unknown.runTask(http://localhost:4200/polyfills.js)
	at Unknown.invokeTask(http://localhost:4200/polyfills.js)
	at Unknown.invokeTask(http://localhost:4200/polyfills.js)
	at Unknown.globalZoneAwareCallback(http://localhost:4200/polyfills.js)
	at Unknown.handleEvent*customScheduleGlobal(http://localhost:4200/polyfills.js)
	at Unknown.scheduleTask(http://localhost:4200/polyfills.js)

 



 Comments   
Comment by Christopher Zimmermann [ 30/Nov/21 ]

Less serious then the above problem - when using angular-editor in firefox, upon every page load in page editor I get this warning:

Mon Nov 29 14:33:10 GMT+100 2021 info.magnolia.ui.vaadin.external.gwt.client.PageEditor
WARNING: Not CMSComment element, skipping: java.lang.IllegalArgumentException: Tagname must start with +'cms:'. 

Will the fix on this ticket address this at all?

Comment by Robert Šiška [ 30/Nov/21 ]

czimmermann see PAGES-540

Generated at Mon Feb 12 06:19:56 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.