Skip to content
This repository was archived by the owner on Feb 5, 2025. It is now read-only.

Conversation

@ScoutHarris
Copy link
Contributor

@ScoutHarris ScoutHarris commented Mar 29, 2021

Ref: wordpress-mobile/WordPress-iOS#16145
WPiOS PR: wordpress-mobile/WordPress-iOS#16186

When a user enters a site address to log in, wp-admin is removed before string is validated. Previously, if anything came after wp-admin the regex match would fail, causing the API not to recognize the URL. This change updates the regex pattern to remove wp-admin and anything after it.

Bonus: I added the clear button to text entry fields in the auth views, set to appear when editing.

Screen Shot 2021-03-29 at 3 28 02 PM

Can be tested with the referenced WPiOS PR.

Note: swiftlint autocorrect found a lot of changes. The commit for this fix is c036825.

@ScoutHarris ScoutHarris added the bug Something isn't working label Mar 29, 2021
@ScoutHarris ScoutHarris self-assigned this Mar 29, 2021
Copy link
Contributor

@aerych aerych left a comment

Choose a reason for hiding this comment

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

Hola @ScoutHarris 👋
Changes look good to me. Tested with the WPiOS branch and I could authenticate with a url that included wp-admin/index.php (for example).
:shipit:

@aerych
Copy link
Contributor

aerych commented Mar 30, 2021

Also...wow ... that autocorrect!

@ScoutHarris ScoutHarris merged commit eaa6b03 into develop Mar 30, 2021
@ScoutHarris ScoutHarris deleted the fix/16145-site_url_check_auth branch March 30, 2021 17:32
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants