-
Couldn't load subscription status.
- Fork 2
Fix/various fixes #43
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
Conversation
β¦mpilation should be at the module level. #28
Remove unused logger of UniversalJSONEncoder
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I haven't looked at the .github modifications since it's your repo and you manage it however you want.
As for the issues mentioned, there are solved. Good work. :)
| ## β οΈ Security Considerations | ||
|
|
||
| **Warning**: Instantiating classes using `__class__` and `__module__` attributes poses a security threat when deserializing untrusted JSON data. Malicious JSON could potentially instantiate arbitrary classes and execute code. | ||
|
|
||
| Only use Kajson to deserialize JSON from trusted sources. For untrusted data, consider: | ||
| - Validating JSON structure before deserialization | ||
| - Using a whitelist of allowed classes | ||
| - Sanitizing input data | ||
|
|
||
| For more discussion on this topic, see [this discussion thread](https://github.com/Pipelex/kajson/discussions/44). | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A necessary addition for sure, informing potentially careless users is always a good idea. :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good, cleaning unused code is just good practice for maintainability.
| # Expressions used to find module names (compiled once at import time): | ||
| __class_expression = re.compile(r"^<class '([a-zA-Z0-9._]*)'>") | ||
| __type_expression = re.compile(r"^<type '([a-zA-Z0-9._]*)'>") | ||
|
|
||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Definitely in its right place now. ;)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would have added docstrings in the code itself so tools like Intellisense in VSCode can give you the doc on the fly too but at least it's documented. :)
π New Features
π Changes
π Security