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

Wrong ip value in send friend_log table #30296

Closed
magento-engcom-team opened this issue Oct 1, 2020 · 5 comments · Fixed by #30355
Closed

Wrong ip value in send friend_log table #30296

magento-engcom-team opened this issue Oct 1, 2020 · 5 comments · Fixed by #30355
Assignees
Labels
CD Issue recommended for the contribution day Component: Other Fixed in 2.4.x The issue has been fixed in 2.4-develop branch Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Priority: P2 A defect with this priority could have functionality issues which are not to expectations. Progress: done Reported on 2.3.4 Indicates original Magento version for the Issue report. Reproduced on 2.4.x The issue has been reproduced on latest 2.4-develop branch Severity: S2 Major restrictions or short-term circumventions are required until a fix is available.

Comments

@magento-engcom-team
Copy link
Contributor

Proconditions:

  • Create a product
  • Email to Friend set to "Enabled" in configurations
  • Limit Sending By set to "IP address"
  • Allow for Guests set to "Yes" (not nessesary but if you don't you have create customer before.)

Steps To Reproduce:

  • Go to storfront to the product page
  • Click on send email to friend icon
  • Fill all required fields and click "Send" button
  • Check sendfriend_log table

(/) Expected Result:
Ip value should be converted to biginteger value

(x) Actual Result:
Ip value is not converted properly and it cuted. F.e. If your ip value 127.0.0.1 it will be cutted to 1270.

(!) Notice:
It can cause problems with sendFriend IP validation if different customers will have similar IP addresses

(!) Issue caused by:
\Magento\Framework\HTTP\PhpEnvironment\RemoteAddress::getRemoteAddress method does not work corectly. Because if it cahced the value one time it will always return cached value despite input parameter

(!)Notice:
Bug blocked this test \Magento\SendFriend\Model\SendFriendTest::testisExceedLimitByIp please unskip after bug fixing

Note from comments:
{quote}Once issue with 'Magento\Framework\HTTP\PhpEnvironment\RemoteAddress::getRemoteAddress' will be fixed please remove ip2long conversion in \Magento\SendFriend\Model\ResourceModel\SendFriend::addSendItem and make sure this case covered with integration tests{quote}

@magento-engcom-team magento-engcom-team added Priority: P2 A defect with this priority could have functionality issues which are not to expectations. Progress: ready for dev Severity: S2 Major restrictions or short-term circumventions are required until a fix is available. labels Oct 1, 2020
@magento-engcom-team
Copy link
Contributor Author

The issue was exported from the internal JIRA. The link to the original JIRA issue: https://jira.corp.magento.com/browse/MC-31968

@m2-assistant
Copy link

m2-assistant bot commented Oct 1, 2020

Hi @magento-engcom-team. Thank you for your report.
To help us process this issue please make sure that you provided the following information:

  • Summary of the issue
  • Information on your environment
  • Steps to reproduce
  • Expected and actual results

Please make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, please, add a comment to the issue:

@magento give me 2.4-develop instance - upcoming 2.4.x release

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

Please, add a comment to assign the issue: @magento I am working on this


⚠️ According to the Magento Contribution requirements, all issues 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 issues 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

@magento-engcom-team magento-engcom-team added Component: Other Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Reproduced on 2.4.x The issue has been reproduced on latest 2.4-develop branch labels Oct 1, 2020
@magento-engcom-team magento-engcom-team added the Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development label Oct 1, 2020
@magento-engcom-team
Copy link
Contributor Author

✅ Confirmed by @magento-engcom-team
Thank you for verifying the issue. Based on the provided information internal tickets MC-31968 were created

Issue Available: @magento-engcom-team, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself.

Bartlomiejsz added a commit to Bartlomiejsz/magento2 that referenced this issue Oct 7, 2020
@sivaschenko sivaschenko added the CD Issue recommended for the contribution day label Oct 7, 2020
Bartlomiejsz added a commit to Bartlomiejsz/magento2 that referenced this issue Oct 7, 2020
… of ip conversion into int to integration test
@Bartlomiejsz
Copy link
Contributor

@magento I am working on this

@m2-community-project m2-community-project bot added Progress: PR Created Indicates that Pull Request has been created to fix issue and removed Progress: ready for dev Progress: PR Created Indicates that Pull Request has been created to fix issue labels Oct 7, 2020
@magento-engcom-team magento-engcom-team added Progress: ready for dev and removed Progress: PR Created Indicates that Pull Request has been created to fix issue labels Oct 15, 2020
@magento-engcom-team magento-engcom-team added the Fixed in 2.4.x The issue has been fixed in 2.4-develop branch label Oct 16, 2020
@magento-engcom-team
Copy link
Contributor Author

Hi @magento-engcom-team. Thank you for your report.
The issue has been fixed in #30355 by @Bartlomiejsz in 2.4-develop branch
Related commit(s):

The fix will be available with the upcoming 2.4.2 release.

magento-engcom-team added a commit that referenced this issue Oct 16, 2020
 - Merge Pull Request #30355 from Bartlomiejsz/magento2:bugfix/30296_sendfriend_wrong_ip
 - Merged commits:
   1. ccc83b2
   2. bc53649
@sdzhepa sdzhepa added the Reported on 2.3.4 Indicates original Magento version for the Issue report. label Nov 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CD Issue recommended for the contribution day Component: Other Fixed in 2.4.x The issue has been fixed in 2.4-develop branch Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Priority: P2 A defect with this priority could have functionality issues which are not to expectations. Progress: done Reported on 2.3.4 Indicates original Magento version for the Issue report. Reproduced on 2.4.x The issue has been reproduced on latest 2.4-develop branch Severity: S2 Major restrictions or short-term circumventions are required until a fix is available.
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

4 participants