Recurring bug: "wrong origin" console.log() calls again cause memory leaks! #790
Labels
investigation-needed
Indication that the maintainer or involved community members may need to investigate more.
This bug is closely related to #616.
The original cause of the memory leak (reported in #616) was fixed, but immediately another cause was introduced (for whatever cause?) by the commit 4bf8901#diff-fbc8c2d288ee2f0a2a9d42a46e5292bd
See this line:
angular-oauth2-oidc/projects/lib/src/oauth-service.ts
Line 1204 in ff82dd9
Whenever any message (!) is posted by any source (!), the whole
MessageEvent
is being logged into the console. Which basically means that references to the huge source and target objects are forever stored in the console for no reason. This, in turn, means that these resources can never be freed by the garbage collector!The fix would be trivial: the event object should not be logged to the console.
However, IMO it makes no sense to log anything at all to the console whenever ANY source posts ANY message. Logging should ONLY be utilized for messages that are related to oidc and this library. Other messages should be completely ignored.
Severity
In applications that only use
postMessage()
for authentication messages within oauth, this bug does not cause any issues. But in applications that heavily usepostMessage()
calls and create/destroy multiple iframes over their lifetime, this is an extremely critical issue that easily causes the whole application to fail.The text was updated successfully, but these errors were encountered: