Skip to content
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

Add support for Ruby 3.3 #18668

Closed

Conversation

adfoster-r7
Copy link
Contributor

Adds support for Ruby 3.3

Verification

Ensure that CI passes

@adfoster-r7 adfoster-r7 marked this pull request as draft January 5, 2024 12:49
@adfoster-r7 adfoster-r7 force-pushed the add-support-for-ruby-3.3 branch from 18ebc19 to e9b7029 Compare January 5, 2024 12:50
@@ -83,8 +83,7 @@ Gem::Specification.new do |spec|
# NTLM authentication
spec.add_runtime_dependency 'rubyntlm'
# Needed by anemone crawler
# Locked until build env can handle newer version due to native compile issue in 1.15.x
spec.add_runtime_dependency 'nokogiri', '~> 1.14.0'
spec.add_runtime_dependency 'nokogiri'
Copy link
Contributor Author

@adfoster-r7 adfoster-r7 Jan 5, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nokogiri v16 is required for Ruby 3.3 support

But it looks like this was pinned previously by #18103 when there were issues with compiling the nightly omnibus installers with older. Before we merge this, we'll need to manually rebuild the omnibus installer to see if the previous issues are resolved or not, as it looks like some changes have been made to how they handle libxml

@adfoster-r7 adfoster-r7 force-pushed the add-support-for-ruby-3.3 branch 2 times, most recently from ddfe6db to f51af88 Compare January 5, 2024 13:15
@@ -495,7 +495,7 @@ GEM
rack (~> 2.2, >= 2.2.4)
rack-protection (= 3.1.0)
tilt (~> 2.0)
sqlite3 (1.6.6)
sqlite3 (1.7.0)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@adfoster-r7 adfoster-r7 force-pushed the add-support-for-ruby-3.3 branch 5 times, most recently from 279b183 to d728419 Compare January 5, 2024 17:15
@@ -70,7 +72,9 @@ def generate(_opts = {})
shellcode = shellcode + command_string + "\x00"

# we need to align our shellcode to 4 bytes
(shellcode = shellcode + "\x00") while shellcode.length%4 != 0
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bit of a weird behaviour change here between ruby versions:

shellcode = ""

(shellcode = shellcode + "\x00") while shellcode.bytesize%4 != 0

puts RUBY_DESCRIPTION
puts shellcode.bytesize

Ruby 3.0:

$ ruby foo.rb       
ruby 3.0.2p107 (2021-07-07 revision 0db68f0233) [x86_64-darwin20]
0

Ruby 3.3:

$ ruby foo.rb
ruby 3.3.0 (2023-12-25 revision 5124f9ac75) [x86_64-darwin22]
4

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like this is fixed in the head of Ruby now; Will leave it as-is

@adfoster-r7 adfoster-r7 force-pushed the add-support-for-ruby-3.3 branch 2 times, most recently from e5f67f6 to 7901125 Compare January 9, 2024 11:32
@adfoster-r7
Copy link
Contributor Author

This is blocked until Nokogiri 1.16.1 is released with this GCC fix for omnibus installer sparklemotion/nokogiri#3090

@adfoster-r7 adfoster-r7 force-pushed the add-support-for-ruby-3.3 branch 2 times, most recently from 5b8d5f3 to 0f67182 Compare February 7, 2024 12:53
@adfoster-r7 adfoster-r7 force-pushed the add-support-for-ruby-3.3 branch from 0f67182 to 458606f Compare February 7, 2024 13:01
@adfoster-r7
Copy link
Contributor Author

I've split this PR up into smaller groups; should be able to close this now 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants