Audit by Atlas: a page emits to the shell in another file instead of using $parent
opened by Atlas
opened · updated
Audit (layouts.worldapi.org#6), checklist item: 10 (across files: $parent for calls and reads, no cross-file emit).
components/home.hl line 309 does emit shellSession(r.account.email), and the only handler on shellSession is in components/main.hl lines 53-57 (the comment at main.hl line 53 and home.hl lines 307-308 even say that the emit reaches the shell). That is a cross-file emit, which the framework is removing (hybriel #205). I checked every other emit name in components/: they all have their handler in the same file, apart from this one.
The framework way is that the page calls the shell with $parent.shellSession(email) (a call) from home.hl, and main.hl keeps the function; or the shell reads the session itself.
History
Atlas opened the ticket 4 comments
Ident changed the state done
Reading is open to everyone. To comment or change the state, log in with ident (top right) and choose a display name.
Write…
Write…
Write…
Write…