-
Notifications
You must be signed in to change notification settings - Fork 65
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
[Mac Sonoma] "WARNING: Secure coding is not enabled for restorable state" warning message #630
Comments
The warning message first appears at this point: equinox/bundles/org.eclipse.equinox.launcher/src/org/eclipse/equinox/launcher/Main.java Line 2175 in c4be7f2
And so, if it is possible to implement this, it will be in the native JNI code here: Where is the main |
I first reported this issue in the SWT issue tracker, and then closed that one and opened it here because the warning message appearing at the So I'm not sure whether to continue to trace this to SWT or Equinox. Or maybe both? Need to find out where the @HannesWell @HeikoKlare WDYT? |
This JDK issue could be related: https://bugs.openjdk.org/browse/JDK-8318854 |
Yes, thanks for the link. They've implemented I've been trying to figure out how to do the same in SWT. So far I've found some clues in the I can add a |
I'm sorry, but I can't help much on this: I have only little knowledge about the C code itself and zero knowledge about Mac their API. |
I am sorry, but unfortunately the same holds for me. I use a Mac only for validation purposes and for migrating changes I make for one OS (in particular Windows) to the others, but I have no knowledge about the system's APIs, the native SWT code etc. Just from what I have seen so far, I would expect that SWT code is responsible for |
- See eclipse-platform#1228 - On macOS 14 and later a warning message is written to console: "WARNING: Secure coding is not enabled for restorable state! Enable secure coding by implementing NSApplicationDelegate.applicationSupportsSecureRestorableState: and returning YES." - As recommended by Apple, this change adds a new selector for applicationSupportsSecureRestorableState and returns a 1 value (YES) in the callback in the Display class - However, this only takes care of the NSApplicationDelegate created in the Display class. The warning message will still appear when a splash screen is created in Equinox JNI code so a fix there is also required. See eclipse-equinox/equinox#630 - This implementation for SWT can be tested by using the -noSplash argument when launching Eclipse
It turns out that this warning message is triggered in two places - SWT and Equinox. Both use a I've fixed the SWT case here but I can't fix the issue in the JNI code. I think this file needs to change. |
PR - #632 |
- See eclipse-equinox#630 - On macOS 14 and later a warning message is written to console: "WARNING: Secure coding is not enabled for restorable state! Enable secure coding by implementing NSApplicationDelegate.applicationSupportsSecureRestorableState: and returning YES." - This adds an NSApplicationDelegate that implements applicationSupportsSecureRestorableState
- See #1228 - On macOS 14 and later a warning message is written to console: "WARNING: Secure coding is not enabled for restorable state! Enable secure coding by implementing NSApplicationDelegate.applicationSupportsSecureRestorableState: and returning YES." - As recommended by Apple, this change adds a new selector for applicationSupportsSecureRestorableState and returns a 1 value (YES) in the callback in the Display class - However, this only takes care of the NSApplicationDelegate created in the Display class. The warning message will still appear when a splash screen is created in Equinox JNI code so a fix there is also required. See eclipse-equinox/equinox#630 - This implementation for SWT can be tested by using the -noSplash argument when launching Eclipse
…latform#1231) - See eclipse-platform#1228 - On macOS 14 and later a warning message is written to console: "WARNING: Secure coding is not enabled for restorable state! Enable secure coding by implementing NSApplicationDelegate.applicationSupportsSecureRestorableState: and returning YES." - As recommended by Apple, this change adds a new selector for applicationSupportsSecureRestorableState and returns a 1 value (YES) in the callback in the Display class - However, this only takes care of the NSApplicationDelegate created in the Display class. The warning message will still appear when a splash screen is created in Equinox JNI code so a fix there is also required. See eclipse-equinox/equinox#630 - This implementation for SWT can be tested by using the -noSplash argument when launching Eclipse
This issue has been inactive for 180 days and is therefore labeled as stale. |
The issue
When running Eclipse or an RCP app on macOS Sonoma a warning message is written to the console:
eclipse[4647:170325] WARNING: Secure coding is not enabled for restorable state! Enable secure coding by implementing NSApplicationDelegate.applicationSupportsSecureRestorableState: and returning YES.
I've Googled this and it seems that this could lead to a vulnerabilty and needs to be addressed. For example see here:
https://stackoverflow.com/questions/77283578/sonoma-and-nsapplicationdelegate-applicationsupportssecurerestorablestate?rq=2
To Reproduce
The only way to see this warning message is to run Eclipse on Mac Sonoma from the command line so the message is written to the console in the Terminal app:
Eclipse.app/Contents/MacOS/eclipse
Expected behavior
The warning message should not appear.
Environment:
macOS Sonoma 14.5
MacBook M2 aarch64
Temurin JDK 17.0.11+9
Eclipse 4.31 and latest 4.32 I builds
The text was updated successfully, but these errors were encountered: