-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Split up Preload Script based on the Window #98
Comments
The following comments should be partially solved by this issue Once we tackle this issue, we should make sure those todos are solved as well (or make an issue if not) |
@walmat I should clarify what I meant by "partially solved" for those lines. Previously any window would be allowed to register/deregister for events. With the preload script split up, some windows would no longer have access to the event registration (since they don't need that functionality), so any checks that could prevent an unauthorized window (such as the About window) from registering from events no longer need to exist (since we explicitly remove that functionality from the window). |
I'm not sure if there are more checks needed after splitting up the preload scripts. If you can't think of any, we can remove those todo comments in #283. |
Is your feature request related to a problem? Please describe.
The preload script is introducing a lot of required functionality for the frontend to communicate with the Electron Main process. However, certain windows don't need to have access to certain functions. This access allows unintended actions to be possible.
Examples:
Describe the solution you'd like
The preload script methods should be grouped together and split out into separate "function" files (i.e. a file for all captcha related methods and a file for all auth related methods). Then a specific preload.js file should be created for each window type. These files will import in the "function" files and expose them on the window bridge.
Additional context
This issue is originally from this comment thread in #96
The text was updated successfully, but these errors were encountered: