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

chore: private key support for textArea #4815

Merged
merged 1 commit into from
Jun 19, 2024
Merged

Conversation

achettyiitr
Copy link
Member

Description

  • The output for textArea comes as something like which includes new line:
    "-----BEGIN ENCRYPTED PRIVATE KEY-----\nMIIFJDBWBgkqhkiG9w0BBQ0wSTAxBgkqhkiG9w0BBQwwJAQQIkGZl82mtwiAPq1R\nw5s41wICCAAwDAYIKoZIhvcNAgkFADAUBggqhkiG9w0DBwQINjWWf0rVoMgEggTI\nIYSenjV/PQ2FQJLGqAnwxnFHeE1TruHmXCxBR5dGElSHJ2Lf6kYsVCGoK0eTv3/t\n21Yv4QyMusuc0kopzwttkOHZhN47E4bSW5VOKdJ1ic6nq0J2SONmaPK4DRgdNHhJ\nKt2iQbhEMaI+7gmcg38/QqbfW8nhy81/4HZ99PirJ1mqyXK14rn3HIczm++mdsd9\nHNc+8EK+YT/V2IIdvxkYXNw33p6vrvXIKS461uK/S2941zrlNG7NmaVwH7wlejVh\n9SnraYmYLHJfDUjsF7pVZTe1Zv6YXVyEQz0VOjDjU8PRjn4hoiJ+IMPB7A56LUgx\nzLfAyBD4JD/kke9xtgpmVs/03IAWOfK/+EZvKdmlySdjRpx0CWLxYmecZ9mRyOZ1\nOav8TI0XPb7nEvE3GRboqhE8/rUkp2w/hLz+gGKnHSJ2YtbDjQ3QqVUuXtYySwep\nHjWa6i3nU3V/rEz6mFpbn/LOcahQ5dgx9lDm2kyh3eVMyrFrdD0R0ehDpISpO4Z/\nk05vgFaOr566m4Km9aCE5P4mIf8MxgkJUEZmjFwefVxfhkvBhnhMs6OPL5gNtxUk\nhzRLIyR8zvFJk+2bCLrmY93mdXLuRLB6IjlhAtP4dgbhFLDAqKb/y7R+HukMK4Ba\nsrTJ5cix8dnWovKDcO+w5QqAJDfIQ3znjcqEfVmhN/GIEuMwnnf1qEbwPzvVGu1m\n/vYmYl32tOeYJZGgD4+oHauC5Vjly9yJyrjqmNKPEcNBvqG0wM4t4WFZC88Au0sv\niO+YwN4dz1V72ptmcIKVDzoeELOxdFMJgLfXHcxVkCvpNCVFJKJd0PwP39KHf3IA\nVNfsmwCwsIIOboWvqnvkx/NWFM40X4vdlDA4yqZYcCHsK6l8ghpFMiaUO1mMD/4m\n/pMJ56dNY3dfLrk6dzGDicu304Q4PFcKh1OKa9K+fHByEGNmqtPojxKkRq5980Ve\nXIbU/Ihb5AU9hR0hLCP0EGdgxfHSW0+h4tUTNlvlUqHhvGtmVu4s77s2xscOmpEC\nBqMeUtDopLMIlOcT6nPT+VVKzW7OKoBPVWyxE4qNKf9qa8IUv1Cq+S1GifqH+++3\nK3YVSGpx3jUKAO8acYZhvcmP3qHTXlEkc4PjrvwjD2RMLXktqI3M+pPBQv3pdCYk\n4tDy88/4a0qJ46NSTP6HkUn45qsemYodAv1Cka5ZGHtosCaBN7lPrGZoJIBNB5u3\nqSa119XWbH3KFxBQjU3OcAvMhOoRTdybzj9dwf6eTYSg5UmHOhXPSkJQBFKXBpYh\nVz6uQcZtS8bC0Hd7vrQKS2N4BLTHDjyT+shh4prpII1VcHRIJ+kfCpbqG4DhwwDG\np7CdTgf7GLIxAvpttG5ro8l9EVIX4vqxgigmfCVRJOOlxhyEImEyKY/gRJc5j4Lv\nnQ13Fj18ROUYEVc9utyqc4f/xjUlq7T99UnsRsPnxeluKedYYm1lJZuV/J5uv93k\nyGb7LkSPoO4NYO8CTocpht9R7BI6ip0k3NQ5QDME+3b5vcBZZw44VV3C82ZgL2CV\nUpitvQP94v3M3heOhmhHcYzZ9hWeXmRAXEq9h38YBxcpa5NpaB+nG3U8751w3QqV\nOd88SuehROcTSdLCUDbXeP1rn6ch92r0\n-----END ENCRYPTED PRIVATE KEY-----",
    
  • The output for textInput comes as something like which spaces:
    "-----BEGIN ENCRYPTED PRIVATE KEY----- MIIFJDBWB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MxP3hZP2jS JomlbMvIlf1Jmuzt/I4K7lP61llvQKqsl89bhYLnQyTG7WOoyEL+VmGwyWN+XECX 8zvclFqwzNOOHCMXVfcynB4kZCWeX9L997N8ivj4SiqQ9w0YG2tFaQ6yQUnPMs27 5qBaAz7eQVuGM8Y65fs5S0m+DsJ/PvzfrPoXsKroxFhTrGqtvRkqVt7Z9FxFXctk 2OQO7lf8WgW5jGG/mqPxZ5Q4M7YoSAlkPKbcbCvcLsrVXTr+/ghwnFsGKCDCR4QR pjTqeMxFPHWVhzeSTAmZ0Kbk5i7KUug89TFxfilJa/v4bhEKDm6pcnSorWSUJlhN xxkehZ1GCJdOGNAvKwQ6Gl+2q/W0f+cMT9z2nYB/3Hx4xnqCL4EXRxq0SkoCQDVW W5uMaPy/un6jV+2qrgnt8Sn2Z9Pc0TVo/N3yXGb4mkRFRTn1IPiZePDSHsZ20oXr 4WC403Iw0gs3X5eM/s1DGdi00gU5As8vYScaMQXb68Th+fFPfvc9o9lVfeHkiM/L KcbdeGWnYuc8lj1AVSEubiHLoFGvePk8jsDaWE8oaV4IhLTsU5x3Baj5rNUfqMZv MhFsjpTpmdbgroekHpP1hqeXp8/0TJ/1o96ublAqC5LJpfbYOVGeP3OJgx/ASmrp RA3rnyTeLSAN2KOdvaSyZxGmCxYMLu9p -----END ENCRYPTED PRIVATE KEY-----",
    

Linear Ticket

  • Resolves PIPE-1175

Security

  • The code changed/added as part of this pull request won't create any security issues with how the software is being used.

Copy link
Contributor

coderabbitai bot commented Jun 18, 2024

Important

Review skipped

Auto reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

codecov bot commented Jun 19, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 74.37%. Comparing base (f5d6043) to head (f8a6cea).
Report is 4 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4815      +/-   ##
==========================================
+ Coverage   73.31%   74.37%   +1.05%     
==========================================
  Files         416      417       +1     
  Lines       48763    49041     +278     
==========================================
+ Hits        35750    36472     +722     
+ Misses      10678    10200     -478     
- Partials     2335     2369      +34     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@achettyiitr achettyiitr force-pushed the chore.private-key-support branch 2 times, most recently from d6b48e7 to f475663 Compare June 19, 2024 02:11
@cisse21 cisse21 merged commit a9f99cd into master Jun 19, 2024
52 checks passed
@cisse21 cisse21 deleted the chore.private-key-support branch June 19, 2024 04:10
@@ -758,7 +758,7 @@ func WHCounterStat(s stats.Stats, name string, warehouse *model.Warehouse, extra
// FormatPemContent formats the content of certificates and keys by adding necessary newlines around specific markers.
func FormatPemContent(content string) string {
// Remove all existing newline characters
formattedContent := strings.ReplaceAll(content, "\n", "")
Copy link
Member Author

Choose a reason for hiding this comment

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

For textInput, this ReplaceAll was essentially not required as it's not replacing anything.

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.

None yet

3 participants