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

Link Check: localhost links not detected #357

Closed
dregad opened this issue Sep 4, 2024 · 5 comments
Closed

Link Check: localhost links not detected #357

dregad opened this issue Sep 4, 2024 · 5 comments

Comments

@dregad
Copy link

dregad commented Sep 4, 2024

Hello @axllent,

I was testing the LinkCheck feature, and noticed that localhost links (which I frequently use while developing) are not detected (http://127.0.0.1 works).

php > mail('test@localhost','Test plain link','http://localhost');

image
image

I guess this could be fixed with a small adjustment to the Regex. e.g. appending |localhost at the end of the 2nd capturing group.

var linkRe = regexp.MustCompile(`(?m)\b(http|ftp|https):\/\/([\w_-]+(?:(?:\.[\w_-]+)+))([\w.,@?^=%&:'!\/~+#-]*[\w@?^=%&\/~+#-])`)

PS: many thanks for MailPit, it's awesome ❤️

@dregad
Copy link
Author

dregad commented Sep 4, 2024

Sorry, forgot to mention this is with v1.18.3. I realize it's somewhat out of date, but I can't upgrade just now, and as far as I can tell the regex is the same in 1.20.3 so I don't think it will make any difference but I'll test again later with the latest version.

@dregad
Copy link
Author

dregad commented Sep 4, 2024

Same behavior confirmed with v1.20.3.

@dregad dregad changed the title localhost links not detected Link Check: localhost links not detected Sep 4, 2024
@axllent
Copy link
Owner

axllent commented Sep 5, 2024

Hi @dregad - I can confirm your issue - the frontend JavaScript was far more relaxed in how it detected a "valid" URL vs: the "backend" for link checking. I have just pushed a fix and released it as part of v1.20.4. Please confirm this new release fixes the issue for you?

@dregad
Copy link
Author

dregad commented Sep 5, 2024

Thanks for responding so quickly. I think your fix should do the trick, will test and confirm later today!

@dregad
Copy link
Author

dregad commented Sep 5, 2024

Confirmed working OK in 1.20.4, thank you very much ! 🚀

@dregad dregad closed this as completed Sep 5, 2024
tmeijn pushed a commit to tmeijn/dotfiles that referenced this issue Sep 13, 2024
This MR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [axllent/mailpit](https://github.com/axllent/mailpit) | patch | `v1.20.3` -> `v1.20.4` |

MR created with the help of [el-capitano/tools/renovate-bot](https://gitlab.com/el-capitano/tools/renovate-bot).

**Proposed changes to behavior should be submitted there as MRs.**

---

### Release Notes

<details>
<summary>axllent/mailpit (axllent/mailpit)</summary>

### [`v1.20.4`](https://github.com/axllent/mailpit/blob/HEAD/CHANGELOG.md#v1204)

[Compare Source](axllent/mailpit@v1.20.3...v1.20.4)

##### Chore

-   Update Go modules
-   Update node modules
-   Upgrade vue-css-donut-chart & related charts

##### Fix

-   Relax URL detection in link check tool ([#&#8203;357](axllent/mailpit#357))

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever MR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this MR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this MR, check this box

---

This MR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy40NDAuNyIsInVwZGF0ZWRJblZlciI6IjM3LjQ0MC43IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJSZW5vdmF0ZSBCb3QiXX0=-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants