Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@rudnerbjoern
Copy link
Contributor

Base information

Question Answer
Related to a SourceForge thead / Another PR / Combodo ticket? No
Type of change? Bug fix

Symptom (bug) / Objective (enhancement)

Some type of URL is not parsed correctly by the url_validation_pattern, like this:

https://calendar.example.com/book/[email protected]/

Reproduction procedure (bug)

Paste the given example to a text field in itop and look at the rendered output. The link will stop right before the at-sign.

Cause (bug)

The DEFAULT_VALIDATION_PATTERN does not allow the @ sign as part of the URL

Proposed solution (bug and enhancement)

Add the @ sign to the regex.
According to RFC 3986 – Uniform Resource Identifier (URI): Generic Syntax, the @ character is a valid character within path segments of a URI. Specifically, it is part of the allowed pchar set and does not need to be percent-encoded (%40) when used in the path component — as long as it is not part of the userinfo or authority sections.

Checklist before requesting a review

  • I have performed a self-review of my code
  • I have tested all changes I made on an iTop instance
  • I have added a unit test, otherwise I have explained why I couldn't
  • Is the PR clear and detailed enough so anyone can understand digging in the code?

@github-project-automation github-project-automation bot moved this to First review needed in Combodo PRs dashboard Jul 18, 2025
@rudnerbjoern rudnerbjoern marked this pull request as ready for review July 18, 2025 12:18
@jf-cbd
Copy link
Member

jf-cbd commented Jul 25, 2025

Hey,
Thanks for your PR. Functionally it's interesting and we'll accept it.
Just notice that since this parameter is flagged as visible, its value is in the default conf file, and the value in the default conf file won't be updated, even on setup.
So it means your correction, when it will be accepted and available in a next iTop version, will only work for new iTop instances.
For the existing one, you'll have to update the "url_validation_pattern" parameter in your conf file.
We'll update the documentation to explain it.

@jf-cbd jf-cbd moved this from First review needed to Pending technical review in Combodo PRs dashboard Jul 25, 2025
@jf-cbd jf-cbd changed the title 🐛 Allow @ as part of url N°8570 - 🐛 Allow @ as part of url Jul 25, 2025
@jf-cbd jf-cbd merged commit 491f55c into Combodo:support/3.2 Aug 1, 2025
1 check passed
@github-project-automation github-project-automation bot moved this from Pending technical review to Finished in Combodo PRs dashboard Aug 1, 2025
@jf-cbd
Copy link
Member

jf-cbd commented Aug 1, 2025

Thanks for your contribution @rudnerbjoern !

@piRGoif
Copy link

piRGoif commented Sep 4, 2025

Can a corresponding test be added in AttributeURLTest::CheckFormatProvider ?

@jf-cbd
Copy link
Member

jf-cbd commented Sep 5, 2025

Good idea (done in 65c9145), thanks for suggestion !

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

Successfully merging this pull request may close these issues.

5 participants