Update main.js#25
Closed
schwetim wants to merge 1 commit into
Closed
Conversation
added third colon to display the time like hh:mm:ss
Collaborator
|
Duplicate: #47 |
khassel
pushed a commit
that referenced
this pull request
May 3, 2026
I reviewed the CodeQL alerts for `js/electron.js`: - [#25](https://github.com/MagicMirrorOrg/MagicMirror/security/code-scanning/25) https://github.com/MagicMirrorOrg/MagicMirror/security/code-scanning/25 - [#22](https://github.com/MagicMirrorOrg/MagicMirror/security/code-scanning/22) https://github.com/MagicMirrorOrg/MagicMirror/security/code-scanning/22 Both point to real bugs. - [#25](https://github.com/MagicMirrorOrg/MagicMirror/security/code-scanning/25): The window size fallback was written as a comma expression (`(800, 600)`), so it did not produce the expected object structure `{ width, height }`. I am not surprised it went unnoticed because it sits in a fallback path. - [#22](https://github.com/MagicMirrorOrg/MagicMirror/security/code-scanning/22): `...new Set(electronSwitchesDefaults, config.electronSwitches)` silently ignored the second parameter. As a result, custom `electronSwitches` were never applied. I am wondering: this has been broken since PR #2643 introduced it, so I'm quite sure it could not have worked as intended in that form. Why didn't anyone (not even @eouia) notice that? 🤔 ## Changes - Fix for [#25](https://github.com/MagicMirrorOrg/MagicMirror/security/code-scanning/25): - Corrects the fallback from `(800, 600)` to a valid size object `{ width: 800, height: 600 }`. - Fix for [#22](https://github.com/MagicMirrorOrg/MagicMirror/security/code-scanning/22): - Sets the default switch explicitly as a correct key-value pair: - `app.commandLine.appendSwitch("autoplay-policy", "no-user-gesture-required")` - Applies custom `config.electronSwitches` individually afterward.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
added third colon to display the time like hh:mm:ss