-
Notifications
You must be signed in to change notification settings - Fork 51
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
Mojave: and NSSharingService Class 'OC_PythonUnicode' disallows secure coding. It must return YES from supportsSecureCoding #251
Comments
Original comment by Ronald Oussoren (Bitbucket: ronaldoussoren, GitHub: ronaldoussoren). This is related to #180 I basically need to adjust the implementation of all OC_* classes to properly support secure coding where possible (claiming to support secureCoding for arbitrary Python objects would not be correct, in the general case NSCoding support falls back to pickling objects and pickle shouldn't be used across security boundaries). I'll probably split all OC_* classes into two classes: one for built-in types where I can support secureCoding, and one for other types that cannot support secureCoding. The change is slightly more involved than changing the implementation of supportsSecureCoding for these classes :-) |
Original comment by Ronald Oussoren (Bitbucket: ronaldoussoren, GitHub: ronaldoussoren). Introduce secureCoding support This introduces secure coding support for a number of classes, This patch is not yet complete, for some reason using OC_BuiltinPythonNumber |
Original comment by Ronald Oussoren (Bitbucket: ronaldoussoren, GitHub: ronaldoussoren). Changeset 66453e390b64 introduces most of the support for secureCoding, except for the support for adding secureCoding to python's builtin number types (int, long, float). The code for that is present in the changeset but is not yet enabled because it causes other problems that I don't understand at this time. The code changes for OC_PythonNumber/OC_BuiltinPythonNumber are similar to those for other classes which do work properly. I won't close this issue until I've debugged the problem I mentioned before. |
Original comment by Ronald Oussoren (Bitbucket: ronaldoussoren, GitHub: ronaldoussoren). Enable OC_BuiltinPythonNumber to fully implement secureCoding |
Original comment by Ronald Oussoren (Bitbucket: ronaldoussoren, GitHub: ronaldoussoren). Import ABCs from collections.abc instead of collections Fixes #251 |
Original comment by Marc Van Olmen (Bitbucket: marc_at_acclivitynyc, ). Thanks for getting this resolved so quickly |
Original report by Marc Van Olmen (Bitbucket: marc_at_acclivitynyc, ).
Steps:
I have an Objective-c class that implements the following method:
Then when I call this code from Python PyObjC 4.2.1 and also tried 5.0 the objects that are passed in are OC_PythonUnicode objects. My python environment is 64-bit Python 2.7.15.
This code worked fine under macOS High Sierra, but under Mojave this above code fails.
This is the error I'm getting under Mojave:
So it seems that OC_PythonUnicode needs to support supportsSecureCoding and NSSharingService requires objects to be secureCoded..
I solved this problem with the following workaround:
The text was updated successfully, but these errors were encountered: