Closed
Conversation
Contributor
|
I haven't looked at the differences, but #21025 looks to solve the same problem |
Author
|
Thanks for your pull request! We require for all contributed code to come from a from a unique branch in your repository before it can be merged. Please create a new branch in your fork of framework and resubmit this from that branch. If you are using Git on the command line that may look like: This helps protect the process, ensure users are aware of commits on the branch being considered for merge, allows for a location for more commits to be offered without mingling with other contributor changes and allows contributors to make progress while a PR is still being reviewed. Please do resubmit from a unique branch, we greatly value your contribution! 🎉 |
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.
This PR fixes a broken code example in the HTTP library documentation for HttpCookieJar (specifically in how-to-send-an-http-request-using-httpclient.md).
Previously, copying and pasting the example into irb resulted in an ArgumentError: domain is missing because the http-cookie library requires a domain parameter to instantiate a new cookie object. I updated the snippet to include domain: 'example.com', path: '/' so developers have a fully functional, runnable example.
Fixes issue #18573
Verification
[x] Start msfconsole
[x] Drop into the interactive Ruby shell by typing irb
[x] Paste the updated code from the documentation:
cj = Msf::Exploit::Remote::HTTP::HttpCookieJar.new
cj.add(Msf::Exploit::Remote::HTTP::HttpCookie.new('PHPSESSID', 'dummy_value', domain: 'example.com', path: '/'))
[x] Verify the command succeeds and returns the HttpCookieJar object without throwing the ArgumentError: domain is missing exception.
[x] Verify the code block is formatted correctly in the markdown file.