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

[php] Update laravel/framework 11.37.0 → 11.38.2 (minor) #174

Merged
merged 1 commit into from
Jan 16, 2025

Conversation

depfu[bot]
Copy link
Contributor

@depfu depfu bot commented Jan 16, 2025

Here is everything you need to know about this update. Please take a good look at what changed and the test results before merging this pull request.

What changed?

✳️ laravel/framework (11.37.0 → 11.38.2) · Repo · Changelog

Release Notes

11.38.2

  • [11.x] Simplify Codebase by Using qualifyColumn Helper Method by @SanderMuller in #54187
  • Revert "Add support for missing Postgres connection options" by @crynobone in #54195
  • Revert "[11.x] Support DB aggregate by group (new methods)" by @crynobone in #54196

11.38.1

11.38.0

Does any of this look wrong? Please let us know.

Commits

See the full diff on Github. The new version differs by 49 commits:


Depfu Status

Depfu will automatically keep this PR conflict-free, as long as you don't add any commits to this branch yourself. You can also trigger a rebase manually by commenting with @depfu rebase.

All Depfu comment commands
@​depfu rebase
Rebases against your default branch and redoes this update
@​depfu recreate
Recreates this PR, overwriting any edits that you've made to it
@​depfu merge
Merges this PR once your tests are passing and conflicts are resolved
@​depfu cancel merge
Cancels automatic merging of this PR
@​depfu close
Closes this PR and deletes the branch
@​depfu reopen
Restores the branch and reopens this PR (if it's closed)
@​depfu pause
Ignores all future updates for this dependency and closes this PR
@​depfu pause [minor|major]
Ignores all future minor/major updates for this dependency and closes this PR
@​depfu resume
Future versions of this dependency will create PRs again (leaves this PR as is)

Summary by Sourcery

Update laravel/framework from 11.37.0 to 11.38.2.

New Features:

  • Add finally method to pipeline helper.
  • Add support for missing Postgres connection options (reverted in 11.38.2).
  • Add support for Attribute return mutators to the Eloquent/Builder pluck method.
  • Add action filter to route:list.
  • Add support for custom payloads and channels in broadcasting.
  • Add fluent Email validation rule.
  • Add middleware support for specific method in resource routes.
  • Support DB aggregate by group (new methods) (reverted in 11.38.2).
  • Add Dispatchable::newPendingDispatch().
  • Add FormRequest::array($key) and Fluent::array($key).

Bug Fixes:

  • Fix breaking change in RefreshDatabase.
  • Fix breaking change - revert replacing string class names with ::class constants.
  • Fix offset range in docblock.
  • Fix wrong @mixin on SoftDeletes trait.
  • Fix times() calls.
  • Fix invokable validation rule return type.
  • Fix: Handle mixed-type values in compileInsert reverted.
  • Encode cache values for SQLite with base64 to prevent failing on \0 characters.

Tests:

  • Add failing test for #54185.

@depfu depfu bot added the depfu label Jan 16, 2025
Copy link

korbit-ai bot commented Jan 16, 2025

By default, I don't review pull requests opened by bots. If you would like me to review this pull request anyway, you can request a review via the /korbit-review command in a comment.

Copy link

Review changes with  SemanticDiff

Copy link

pr-code-reviewer bot commented Jan 16, 2025

👋 Hi there!

Everything looks good!


Automatically generated with the help of gpt-3.5-turbo.
Feedback? Please don't hesitate to drop me an email at webber@takken.io.

Copy link

SQL Injection

Play SecureFlag Play Labs on this vulnerability with SecureFlag!

Description

A SQL Injection is not a new or overly complicated type of attack, yet it continues to sit atop the OWASP Top Ten Application Security Risks after more than 20 years of it having been publicly utilized. This is primarily due to its inherent relative ease of use, coupled with its severity of impact when directed toward the staggeringly high number of websites with poorly written, vulnerable code.

SQL is a query language that is designed to access, modify, and delete data stored in relational databases. Numerous web applications and websites use SQL databases as their method of data storage. Applications with a higher prevalence of older functional interfaces such as PHP and ASP are relatively more susceptible to SQL Injection flaws than applications based on more recent technologies.

Applications are vulnerable to attacks when user-supplied data is not validated, filtered for escape characters or sanitized by the application.

An attacker can use SQL Injection to manipulate an SQL query via the input data from the client to the application, thus forcing the SQL server to execute an unintended operation constructed using untrusted input.

Read more

Impact

A successful SQL Injection attack can result in a malicious user gaining complete access to all data in a database server with the ability to execute unauthorized SQL queries and compromise the confidentiality, integrity, and availability of the application. Depending on the backend DBMS used and the permissions granted to the user on the database, a SQL Injection could result in arbitrary file read/write and even remote code execution.

The severity of attacks that have leveraged SQL Injection should not be understated. Notorious breaches, including the devastating and internationally renowned hacks of Sony Pictures and LinkedIn, for example, are reported to have been executed using SQL Injection.

Scenarios

Subverting application logic through SQL can lead to unpredictable outcomes depending on the context of the SQL statement and the strategy of the attacker.

There are well-known exploitation techniques that attackers leverage depending on the vulnerability within the implementation of the code:

  • Manipulating an SQL query logic to bypass access controls.
  • Retrieving hidden data to return additional results, including data from other tables within the databases, e.g., leveraging the UNION keyword.
  • Executing arbitrary SQL code in the context of the database whether stacked queries are allowed.
  • Accessing files and executing commands in the operating system, depending on the vulnerable code and the database management system.

It is called blind SQL Injection when the injection succeeds, but the code doesn't return the result of the manipulated query to the attacker. Blind injections are still exploitable to retrieve the content using timing analysis, content analysis, or other out-of-bound techniques.

The following is a classic example of subverting application logic to bypass access controls.

Usernames and passwords are ubiquitous as the method for logging into applications. In this benign scenario, a user submits the username user and the password secret. The application then performs a SQL query to verify the credentials:

SELECT * FROM users WHERE username = 'user' AND password = 'secret'

The login is successful if the query returns the details of the user. If the query doesn't return the user details, it is rejected.

By leveraging single quotes and SQL comments (--), it is possible to log in as any user without a password, as the password check from the WHERE clause is removed from the query.

The following example illustrates this in action. By entering administrator'-- in the username field and leaving the password field blank, the SQL statement would result as the following:

SELECT * FROM users WHERE username = 'administrator'--' AND password = '

The database evaluates this statement without the commented out part, executing just the first part:

SELECT * FROM users WHERE username = 'administrator'

Since the manipulated query always returns the details of the administrator user, the attacker can successfully log in without knowing the correct password.

Prevention

To avoid SQL Injection vulnerabilities, developers need to use parameterized queries, specifying placeholders for parameters so that they are not considered as a part of the SQL command; rather, as solely data by the database.

When working with legacy systems, developers need to escape inputs before adding them to the query. Object Relational Mappers (ORMs) make this easier for the developer; however, they are not a panacea, with the underlying mitigations still entirely relevant: untrusted data needs to be validated, query concatenation should be avoided unless absolutely necessary, and minimizing unnecessary SQL account privileges is crucial.

Testing

Verify that where parameterized or safer mechanisms are not present, context-specific output encoding is used to protect against injection attacks, such as the use of SQL escaping to protect against SQL Injection.

View this in the SecureFlag Knowledge Base

Copy link

sourcery-ai bot commented Jan 16, 2025

Reviewer's Guide by Sourcery

This PR updates the laravel/framework package from version 11.37.0 to 11.38.2. This is a minor update that includes several bug fixes, new features, and improvements. Two features, "Add support for missing Postgres connection options" and "Support DB aggregate by group", were added and subsequently reverted in this release window. Additionally, a breaking change in RefreshDatabase was fixed. Finally, several other fixes and improvements were included, such as simplifying the codebase, adding support for custom payloads and channels in broadcasting, and adding a fluent Email validation rule.

No diagrams generated as the changes look simple and do not need a visual representation.

File-Level Changes

Change Details Files
Upgrade laravel/framework from 11.37.0 to 11.38.2
  • Updated the version constraint for laravel/framework in composer.lock
composer.lock

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time. You can also use
    this command to specify where the summary should be inserted.

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link

gooroo-dev bot commented Jan 16, 2025

Please double check the following review of the pull request:

Since the provided diff is empty, there are no changes to review. However, I will still follow the guidelines to provide a structured response.

Issues counts

🐞Mistake 🤪Typo 🚨Security 🚀Performance 💪Best Practices 📖Readability ❓Others
0 0 0 0 0 0 0

Changes in the diff

Since the diff is empty, there are no changes to summarize.

Identified Issues

As there are no changes in the diff, there are no identified issues to report.

Missing Tests

Since there are no changes in the diff, there are no new tests to generate.

If you have any specific concerns or need further assistance, please provide more details or a non-empty diff for analysis.

Summon me to re-review when updated! Yours, Gooroo.dev
React or reply to let me know what you think!

Copy link

coderabbitai bot commented Jan 16, 2025

Important

Review skipped

Bot user detected.

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.


🪧 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>, please review it.
    • 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 gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @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 using 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 generate docstrings to generate docstrings for this PR. (Beta)
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration 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

instapr bot commented Jan 16, 2025

Feedback:

  • Reviewed the changes in laravel/framework updates.
  • Composer.lock file updated to version 11.38.2.
  • Verification of URLs and references have been updated accordingly.

This PR looks good to merge.

Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

We have skipped reviewing this pull request. It seems to have been created by a bot (hey, depfu[bot]!). We assume it knows what it's doing!

Copy link

deepsource-io bot commented Jan 16, 2025

Here's the code health analysis summary for commits e601bfa..28f5acc. View details on DeepSource ↗.

Analysis Summary

AnalyzerStatusSummaryLink
DeepSource SQL LogoSQL✅ SuccessView Check ↗
DeepSource Test coverage LogoTest coverage✅ SuccessView Check ↗
DeepSource Secrets LogoSecrets✅ SuccessView Check ↗
DeepSource PHP LogoPHP✅ SuccessView Check ↗
DeepSource Docker LogoDocker✅ SuccessView Check ↗

Code Coverage Report

MetricAggregatePhp
Branch Coverage100%100%
Composite Coverage33.3%33.3%
Line Coverage33.3%33.3%

💡 If you’re a repository administrator, you can configure the quality gates from the settings.

@github-actions github-actions bot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Jan 16, 2025
@guibranco guibranco enabled auto-merge (squash) January 16, 2025 02:00
@gstraccini gstraccini bot added the ☑️ auto-merge Automatic merging of pull requests (gstraccini-bot) label Jan 16, 2025
Copy link
Member

@guibranco guibranco left a comment

Choose a reason for hiding this comment

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

Automatically approved by gstraccini[bot]

@gstraccini gstraccini bot added the 🤖 bot Automated processes or integrations label Jan 16, 2025
@guibranco
Copy link
Member

@depfu merge

Copy link

Potential issues, bugs, and flaws that can introduce unwanted behavior:

  1. File Path: composer.lock

    • The version update for the "laravel/framework" from v11.37.0 to v11.38.2 may introduce breaking changes that are not accounted for in the codebase. This could lead to runtime errors if the application relies on specific functionality from the previous version.
  2. File Path: composer.lock

    • Changing the "url" field for the laravel/prompts dependency from https://github.com/briannesbitt/Carbon.git to https://github.com/CarbonPHP/carbon.git may cause issues if the Carbon library has been moved without proper redirection or if this new repository is not compatible with prior versions. If any previous functionality in your application relies on the original repository, this could lead to conflicts or failures.

Code suggestions and improvements for better exception handling, logic, standardization, and consistency:

  1. File Path: composer.lock

    • Ensure to test your application thoroughly after the framework version upgrade since version jumps could have significant implications. It’s advisable to review the changelog or migration guide for laravel/framework to understand all changes made and any potential migration steps required.
  2. File Path: composer.lock

    • Update dependency management practices to include version constraints and ensure compatibility across dependencies. This includes using semantic versioning where applicable (e.g., "laravel/framework": "^11.38" instead of hardcoding the version), which allows Composer to resolve potential conflicts more effectively in future updates.
  3. File Path: composer.lock

    • Consider leveraging the minimum-stability setting in your composer.json. It is essential if you are relying on packages that might not always be at stable releases. Defaults to stable, which could lead to undeclared versions being deployed, leading to unexpected behaviors.
  4. File Path: composer.lock

    • Post-upgrade, ensure to run all unit and integration tests to verify that all components are functioning correctly with the new versions of dependencies before pushing the changes to production.

@guibranco guibranco merged commit fa438e8 into main Jan 16, 2025
24 of 25 checks passed
@guibranco guibranco deleted the depfu/update/composer/laravel/framework-11.38.2 branch January 16, 2025 02:01
Copy link

korbit-ai bot commented Jan 16, 2025

I was unable to write a description for this pull request. This could be because I only found files I can't scan.

Copy link

Infisical secrets check: ✅ No secrets leaked!

💻 Scan logs
2:02AM INF scanning for exposed secrets...
2:02AM INF 174 commits scanned.
2:02AM INF scan completed in 394ms
2:02AM INF no leaks found

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
☑️ auto-merge Automatic merging of pull requests (gstraccini-bot) 🤖 bot Automated processes or integrations depfu size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants