Open
Conversation
Taint checking has been completely removed from Ruby as of Ruby 3.2.0. This commit removes taint checking functions from ruby- shadow. See https://bugs.ruby-lang.org/issues/16131
|
Taintedness is deprecated since 2.7.0 and this commit ruby/ruby@ffd0820 actually shows To keep compatibility, I think the following is better. |
|
By the way created "issue" ticket as #32 . |
apalmblad
reviewed
Dec 15, 2022
| return rb_struct_new(rb_sPasswdEntry, | ||
| rb_tainted_str_new2(entry->pw_name), /* sp_namp */ | ||
| rb_tainted_str_new2(entry->pw_passwd), /* sp_pwdp, encryped password */ | ||
| rb_str_new2(entry->pw_name), /* sp_namp */ |
Owner
There was a problem hiding this comment.
@mhashizume Does this. need to be wrapped in a macro? Are we losing anythign for older rubies?
There was a problem hiding this comment.
Core ruby did something similar when switching dir.c to use untainted strings:
ruby/ruby@ffd0820#diff-13026f61c17631884dc4c6ee9128710ef8801844114eaedaf0a13db649b4b0a2
In Ruby 2.7, taint has no effect on strings, and since older rubies are EOL this should be safe.
tpowell-progress
added a commit
to chef/ruby-shadow
that referenced
this pull request
Jul 8, 2025
Signed-off-by: Thomas Powell <thomas.powell@progress.com>
11 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Taint checking has been completely removed from Ruby as of Ruby 3.2.0. This commit removes taint checking functions from ruby- shadow.
See https://bugs.ruby-lang.org/issues/16131