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

Avoid direct access to reviews list Ajax #33876

Open
wants to merge 3 commits into
base: 2.4-develop
Choose a base branch
from

Conversation

Amadeco
Copy link

@Amadeco Amadeco commented Aug 20, 2021

Description (*)

Do not know wether it is intentional,
But you can access directly to the reviews list Ajax controller however all others controllers for Ajax URL has a conditional test in code.

Capture d’écran 2021-08-20 à 20 32 39

Fixed Issues (if relevant)

Why not restrain this page to Ajax only

Manual testing scenarios

You can give it a try :
/review/product/listAjax/id/9999
=> Display the raw output in the browser.

(9999 = product if from store)

Questions or comments

Give me your think,

Ilan Parmentier

Contribution checklist (*)

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with unit/integration tests (if applicable)
  • README.md files for modified modules are updated and included in the pull request if any README.md predefined sections require an update
  • All automated tests passed successfully (all builds are green)

Resolved issues:

  1. resolves [Issue] Avoid direct access to reviews list Ajax #37920: Avoid direct access to reviews list Ajax

Good evening,

Do not know wether it is intentional,

But you can access directly to the reviews list Ajax controller 

You can give it a try :
/review/product/listAjax/id/111111616
=> Display the raw output in the browser.

Why not restrain this page to Ajax only.

Give me your think,

Ilan Parmentier
@m2-assistant
Copy link

m2-assistant bot commented Aug 20, 2021

Hi @mageho. Thank you for your contribution
Here are some useful tips how you can test your changes using Magento test environment.
Add the comment under your pull request to deploy test or vanilla Magento instance:

  • @magento give me test instance - deploy test instance based on PR changes
  • @magento give me 2.4-develop instance - deploy vanilla Magento instance

❗ Automated tests can be triggered manually with an appropriate comment:

  • @magento run all tests - run or re-run all required tests against the PR changes
  • @magento run <test-build(s)> - run or re-run specific test build(s)
    For example: @magento run Unit Tests

<test-build(s)> is a comma-separated list of build names. Allowed build names are:

  1. Database Compare
  2. Functional Tests CE
  3. Functional Tests EE,
  4. Functional Tests B2B
  5. Integration Tests
  6. Magento Health Index
  7. Sample Data Tests CE
  8. Sample Data Tests EE
  9. Sample Data Tests B2B
  10. Static Tests
  11. Unit Tests
  12. WebAPI Tests
  13. Semantic Version Checker

You can find more information about the builds here

ℹ️ Please run only needed test builds instead of all when developing. Please run all test builds before sending your PR for review.

For more details, please, review the Magento Contributor Guide documentation.

⚠️ According to the Magento Contribution requirements, all Pull Requests must go through the Community Contributions Triage process. Community Contributions Triage is a public meeting.

🕙 You can find the schedule on the Magento Community Calendar page.

📞 The triage of Pull Requests happens in the queue order. If you want to speed up the delivery of your contribution, please join the Community Contributions Triage session to discuss the appropriate ticket.

🎥 You can find the recording of the previous Community Contributions Triage on the Magento Youtube Channel

✏️ Feel free to post questions/proposals/feedback related to the Community Contributions Triage process to the corresponding Slack Channel

@Amadeco
Copy link
Author

Amadeco commented Aug 20, 2021

@magento give me test instance

@magento-deployment-service
Copy link

Hi @mageho. Thank you for your request. I'm working on Magento instance for you.

@Amadeco
Copy link
Author

Amadeco commented Aug 20, 2021

@magento run all tests

@magento-automated-testing
Copy link

The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time.

@magento-deployment-service
Copy link

@bgorski bgorski self-requested a review August 21, 2021 14:22
@bgorski bgorski self-assigned this Aug 21, 2021
@m2-community-project m2-community-project bot moved this from Pending Review to Review in Progress in Pull Requests Dashboard Aug 21, 2021
@m2-community-project m2-community-project bot moved this from Review in Progress to Changes Requested in Pull Requests Dashboard Aug 21, 2021
@bgorski
Copy link
Contributor

bgorski commented Aug 21, 2021

@mageho thank you for your contribution! Indeed, this action can be accessed directly and if indexed by search engines, it may contribute to bad user experience. I had one change request though - please address it and I think we're good to go.

@m2-community-project m2-community-project bot moved this from Changes Requested to Review in Progress in Pull Requests Dashboard Aug 21, 2021
@Amadeco
Copy link
Author

Amadeco commented Aug 21, 2021

@bgorski Hello there, I did the modification by following your advice. We must be good to go. have a nice weekend.

Copy link
Contributor

@bgorski bgorski left a comment

Choose a reason for hiding this comment

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

@mageho indeed we are - approving the PR. The next step is to wait for the core team to prioritize this and to perform manual testing.
Thank you for your contribution!

@m2-community-project m2-community-project bot moved this from Review in Progress to Ready for Testing in Pull Requests Dashboard Aug 21, 2021
@Den4ik Den4ik added the Priority: P3 May be fixed according to the position in the backlog. label Aug 24, 2021
@magento-engcom-team
Copy link
Contributor

Hi @Den4ik, thank you for the review.
ENGCOM-9191 has been created to process this Pull Request

@bgorski bgorski removed the Priority: P3 May be fixed according to the position in the backlog. label Aug 24, 2021
@sidolov sidolov added the Priority: P3 May be fixed according to the position in the backlog. label Oct 28, 2021
@engcom-Lima
Copy link
Contributor

@magento run all tests

@magento-automated-testing
Copy link

The requested builds are added to the queue. You should be able to see them here within a few minutes. Please message the #magento-devops slack channel if they don't show in a reasonable amount of time and a representative will look into any issues.

@engcom-Lima
Copy link
Contributor

@magento give me test instance

@magento-deployment-service
Copy link

Hi @engcom-Lima. Thank you for your request. I'm working on Magento instance for you.

@engcom-Lima engcom-Lima moved this from Ready for Testing to Testing in Progress in Pull Requests Dashboard Aug 25, 2023
@m2-community-project m2-community-project bot moved this from Testing in Progress to Ready for Testing in Pull Requests Dashboard Aug 25, 2023
@m2-community-project m2-community-project bot moved this from Ready for Testing to Testing in Progress in Pull Requests Dashboard Aug 25, 2023
@magento-deployment-service
Copy link

@engcom-Lima
Copy link
Contributor

✔️ QA Passed

Preconditions:

  • Install fresh Magento 2.4-develop and PHP 8.1

Manual testing scenario:

  • Add /review/product/listAjax/id/{productID} after the instance frontend URL and hit.

Before: ✖️ Showing the reviews list.
Screenshot 2023-08-25 at 3 53 14 PM

Screenshot 2023-08-25 at 3 46 39 PM

After: ✔️ Now no direct access to reviews list.

Screenshot 2023-08-25 at 4 08 45 PM

Builds are failed. Hence, moving this PR to Extended Testing.

@engcom-Lima engcom-Lima moved this from Testing in Progress to Extended Testing (optional) in Pull Requests Dashboard Aug 25, 2023
@engcom-Lima
Copy link
Contributor

@magento create issue

@m2-community-project m2-community-project bot moved this from Extended Testing (optional) to Ready for Testing in Pull Requests Dashboard Aug 25, 2023
@engcom-Lima engcom-Lima moved this from Ready for Testing to Extended Testing (optional) in Pull Requests Dashboard Aug 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Auto-Tests: Not Required Changes in Pull Request does not require coverage by auto-tests Component: Review Priority: P3 May be fixed according to the position in the backlog. Progress: extended testing Release Line: 2.4
Projects
Pull Requests Dashboard
  
Extended Testing (optional)
Development

Successfully merging this pull request may close these issues.

[Issue] Avoid direct access to reviews list Ajax
6 participants