-
Notifications
You must be signed in to change notification settings - Fork 14
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
[#204] Handle invalid strings by 'blanking' variable out (4-3-stable) #207
base: 4-3-stable
Are you sure you want to change the base?
Conversation
Template function where the exception was thrown: irods_rule_engine_plugin_python/include/irods/private/re/python.hpp Lines 335 to 340 in 208ecb2
Also, after the rule executes, we update the variables again: irods_rule_engine_plugin_python/src/main.cpp Lines 574 to 581 in 208ecb2
Is that an issue? |
What does works mean here? Does it mean the agent doesn't crash? With your solution, what can users/admins expect now? Does anything appear in the log file?
Is there a benefit to moving the try-catch inside the template function?
I'm not sure. Do a little digging to see what |
blanking does not send any signal to the rule author who may try to access a value that could not be string-ified. not sure if we've agreed that we want to 'blank' the offending binary data, or set it to some well-defined/documented string value. possible candidates...
|
Works means it does not crash, and there are no obvious unintended side effects of the solution.
The affected functions should execute normally, barring the affected variable. Some consideration may be needed if there were a real UTF-8 issue (if we even support UTF?).
No, we can log if we desire, though.
Narrower scope? Less chance of catching other, possibly unrelated issues (e.g. from the <char*> template function).
It would effectively be handled similarly, just further up the stack.
Is it common to modify passed in pep arguments, and have them remain modified afterwards for rule engines? If so, then I think it would depend on how the blanked out variable is used (if at all)? |
If we have something similar in the error table, I think that might be best? A few that might fit:
|
I think the Wait, we know the PEP, so it should be possible to take a special code path based on that. |
right, that could be a way forward. have to hold it very carefully though. |
The current implementation was to make sure the solution works (which it does). Discussion can be had on if it should be implemented as is, or if it should be moved to the templated function where the error comes from.