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

[HOLD for payment 2024-11-14] [$250] Bank account - Website in upper-case letters is accepted despite validation error #52096

Closed
3 of 8 tasks
IuliiaHerets opened this issue Nov 6, 2024 · 27 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 Engineering External Added to denote the issue can be worked on by a contributor

Comments

@IuliiaHerets
Copy link

IuliiaHerets commented Nov 6, 2024

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Version Number: 9.0.58-0
Reproducible in staging?: Y
Reproducible in production?: N
Email or phone of affected tester (no customers): applausetester+kh2610001@applause.expensifail.com
Issue reported by: Applause Internal Team

Action Performed:

  1. Go to staging.new.expensify.com
  2. Go to workspace settings > Workflows.
  3. Click Connect bank account.
  4. Click Connect manually.
  5. Proceed to "What's your company’s website?".
  6. Enter an invalid website to trigger the error.
  7. Note that the error mentions "Please enter a valid website using lower-case letters.".
  8. Enter a website using upper-case letters.
  9. Click Next.

Expected Result:

App will not proceed to the next page because the error mentions that the website must be in lower-case letters (production behavior).

Actual Result:

App proceeds to the next page when using upper-case letters despite the error.

The error message should be updated if this is the expected behavior.

The same validation message also happens in Invoice company website page.

Workaround:

Unknown

Platforms:

  • Android: Standalone
  • Android: HybridApp
  • Android: mWeb Chrome
  • iOS: Standalone
  • iOS: HybridApp
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Bug6656059_1730858126541.20241106_095110.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021854108988948033314
  • Upwork Job ID: 1854108988948033314
  • Last Price Increase: 2024-11-06
  • Automatic offers:
    • suneox | Reviewer | 104768561
    • ahmedGaber93 | Contributor | 104768562
Issue OwnerCurrent Issue Owner: @abekkala
@IuliiaHerets IuliiaHerets added DeployBlockerCash This issue or pull request should block deployment Bug Something is broken. Auto assigns a BugZero manager. labels Nov 6, 2024
Copy link

melvin-bot bot commented Nov 6, 2024

Triggered auto assignment to @Julesssss (DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.

Copy link

melvin-bot bot commented Nov 6, 2024

Triggered auto assignment to @abekkala (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.

Copy link

melvin-bot bot commented Nov 6, 2024

💬 A slack conversation has been started in #expensify-open-source

@melvin-bot melvin-bot bot added the Daily KSv2 label Nov 6, 2024
@github-actions github-actions bot added Engineering Hourly KSv2 and removed Daily KSv2 labels Nov 6, 2024
@melvin-bot melvin-bot bot removed the Hourly KSv2 label Nov 6, 2024
Copy link
Contributor

github-actions bot commented Nov 6, 2024

👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:

  1. Identify the pull request that introduced this issue and revert it.
  2. Find someone who can quickly fix the issue.
  3. Fix the issue yourself.

@NJ-2020
Copy link
Contributor

NJ-2020 commented Nov 6, 2024

Offending PR: #51545

We convert the url to lowercase when checking inside the validation function

if (values.website && !ValidationUtils.isValidWebsite(Str.sanitizeURL(values.website, CONST.COMPANY_WEBSITE_DEFAULT_SCHEME))) {

it should be:

if (values.website && !ValidationUtils.isValidWebsite(values.website)) {

@Krishna2323
Copy link
Contributor

I will raise PR for this, probably in a hour or two.

@nkdengineer
Copy link
Contributor

Proposal

Please re-state the problem that we are trying to solve in this issue.

Bank account - Website in upper-case letters is accepted despite validation error

What is the root cause of that problem?

Offending PR

when we validate website link we convert the url to lowercase and add https:// to this link

if (values.website && !ValidationUtils.isValidWebsite(Str.sanitizeURL(values.website, CONST.COMPANY_WEBSITE_DEFAULT_SCHEME))) {

What changes do you think we should make in order to solve the problem?

we should check if it starts with http then we won't use Str.sanitizeURL function

 if (values.website && !ValidationUtils.isValidWebsite(values.website.startsWith(CONST.COMPANY_WEBSITE_DEFAULT_SCHEME) ? values.website : Str.sanitizeURL(values.website, CONST.COMPANY_WEBSITE_DEFAULT_SCHEME)))

What alternative solutions did you explore? (Optional)

@melvin-bot melvin-bot bot added the Daily KSv2 label Nov 6, 2024
@Julesssss Julesssss added the External Added to denote the issue can be worked on by a contributor label Nov 6, 2024
@melvin-bot melvin-bot bot changed the title Bank account - Website in upper-case letters is accepted despite validation error [$250] Bank account - Website in upper-case letters is accepted despite validation error Nov 6, 2024
Copy link

melvin-bot bot commented Nov 6, 2024

Job added to Upwork: https://www.upwork.com/jobs/~021854108988948033314

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Nov 6, 2024
Copy link

melvin-bot bot commented Nov 6, 2024

Triggered auto assignment to Contributor-plus team member for initial proposal review - @suneox (External)

@Julesssss
Copy link
Contributor

I will raise PR for this, probably in a hour or two.

Thanks

@Krishna2323
Copy link
Contributor

@ahmedGaber93 will be the C+ here.

@Krishna2323
Copy link
Contributor

@ahmedGaber93, should we remove the isLowerCase check from the isValidWebsite function, since the URL will be converted to lowercase in the sanitizeURL function?

/**
* Similar to backend, checks whether a website has a valid URL or not.
* http/https/ftp URL scheme required.
*/
function isValidWebsite(url: string): boolean {
const isLowerCase = url === url.toLowerCase();
return new RegExp(`^${Url.URL_REGEX_WITH_REQUIRED_PROTOCOL}$`, 'i').test(url) && isLowerCase;
}

@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Nov 6, 2024
@Krishna2323
Copy link
Contributor

@ahmedGaber93, PR is ready^, I fixed also fixed this issue in the same PR.

@Julesssss
Copy link
Contributor

Fix was CP'd, asked for a retest here.

@Julesssss
Copy link
Contributor

Fixed here: #52155 (comment)

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Nov 7, 2024
@melvin-bot melvin-bot bot changed the title [$250] Bank account - Website in upper-case letters is accepted despite validation error [HOLD for payment 2024-11-14] [$250] Bank account - Website in upper-case letters is accepted despite validation error Nov 7, 2024
Copy link

melvin-bot bot commented Nov 7, 2024

Reviewing label has been removed, please complete the "BugZero Checklist".

@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Nov 7, 2024
Copy link

melvin-bot bot commented Nov 7, 2024

The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.58-2 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:

If no regressions arise, payment will be issued on 2024-11-14. 🎊

For reference, here are some details about the assignees on this issue:

Copy link

melvin-bot bot commented Nov 7, 2024

@suneox / @ahmedGaber93 @abekkala The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]

@francoisl francoisl removed the DeployBlockerCash This issue or pull request should block deployment label Nov 11, 2024
@melvin-bot melvin-bot bot added Weekly KSv2 and removed Weekly KSv2 labels Nov 11, 2024
@melvin-bot melvin-bot bot changed the title [HOLD for payment 2024-11-14] [$250] Bank account - Website in upper-case letters is accepted despite validation error [HOLD for payment 2024-11-18] [HOLD for payment 2024-11-14] [$250] Bank account - Website in upper-case letters is accepted despite validation error Nov 11, 2024
Copy link

melvin-bot bot commented Nov 11, 2024

The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.59-3 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:

If no regressions arise, payment will be issued on 2024-11-18. 🎊

For reference, here are some details about the assignees on this issue:

Copy link

melvin-bot bot commented Nov 11, 2024

@suneox / @ahmedGaber93 @abekkala The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]

@abekkala abekkala changed the title [HOLD for payment 2024-11-18] [HOLD for payment 2024-11-14] [$250] Bank account - Website in upper-case letters is accepted despite validation error [HOLD for payment 2024-11-14] [$250] Bank account - Website in upper-case letters is accepted despite validation error Nov 13, 2024
@abekkala
Copy link
Contributor

@Julesssss & @ahmedGaber93
I just reviewed the PR - can you confirm that it was @Krishna2323, not @suneox that created the fix?

To me the payouts appear to be:

Which differs from the melvin message above

@Krishna2323
Copy link
Contributor

@abekkala, this was a regression, so no payment needed here.

@abekkala
Copy link
Contributor

aaaah ok ok - thanks @Krishna2323

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Nov 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 Engineering External Added to denote the issue can be worked on by a contributor
Projects
None yet
Development

No branches or pull requests

9 participants