Profile fields are user-created (and can be modified by users at any time), and thus they could potentially be spam. Therefore, profile URLs should be protected with the link condom. i.e. links to URLs in people's profile should have rel="nofollow"

Comments

Wesley Tanaka’s picture

Status: Active » Needs review
StatusFileSize
new417 bytes

patch against HEAD

Wesley Tanaka’s picture

StatusFileSize
new879 bytes

identical patch against head in -U 3 format (sorry about previous patch)

Wesley Tanaka’s picture

StatusFileSize
new706 bytes

Same patch against 4.7 branch's profile.module,v 1.154.2.6

dries’s picture

Status: Needs review » Needs work

Not sure I agree. They don't have to be spam. Drupal has a filter-option that allows you to enable/disable the link condom. Maybe we should use the profile module to use that filter option.

Wesley Tanaka’s picture

Status: Needs work » Needs review
StatusFileSize
new901 bytes

Profile links are as likely to be spam as any other posted content. If rel=nofollow is potentially useful for posted comment, it is also potentially useful for profile links.

The only reference to "rel.*nofollow" I found in the codebase is in _filter_html($text, $format). Attaching a patch which runs the profile link through that function.

Wesley Tanaka’s picture

That didn't come out too clearly. I meant to say:

If we think it's worthwhile to protect against spam links in posted content*, we should also protect against spam links posted in users' profiles.

-----
* which we do

drumm’s picture

Title: profile.module link condom » Add rel="nofollow" to profile url fields
Version: 5.x-dev » 6.x-dev
Category: bug » task
sime’s picture

Status: Needs review » Reviewed & tested by the community

Patch applied.

I set 'format_default_nofollow_0' = TRUE in settings.php (don't think this can be set in UI which is OK IMO)

nofollow applied to profile url as advertised.

I like the option.

dries’s picture

Version: 6.x-dev » 7.x-dev
sun’s picture

Status: Reviewed & tested by the community » Postponed
catch’s picture

Status: Postponed » Needs review

Still applies with offset.

nonenone’s picture

Only local images are allowed.
It worked fine for me.
Only local images are allowed.
Thanks it was a great advice.
Only local images are allowed.
Only local images are allowed.
Only local images are allowed.
Only local images are allowed.

birdmanx35’s picture

This still applies cleanly to core!

gearhead’s picture

Version: 7.x-dev » 5.7

Is there a module that does this?

sun’s picture

Version: 5.7 » 7.x-dev

Resetting version.

webchick’s picture

Status: Needs review » Needs work

No longer applies to 7.x.

aspilicious’s picture

StatusFileSize
new887 bytes

This one does (2 years after last post :p)

sun’s picture

Status: Needs work » Needs review
p.selfin’s picture

suscribe

andyceo’s picture

I think this functionality should be optional. So, if it is not in core, this must be in contributed module.

bangalos’s picture

#17: relNoFoloow.patch queued for re-testing.

Status: Needs review » Needs work

The last submitted patch, relNoFoloow.patch, failed testing.

bangalos’s picture

Status: Needs work » Needs review
StatusFileSize
new715 bytes

This patch applies against 7.x-dev. This was done during Drupal Patch Bingo at Droplabs

Status: Needs review » Needs work

The last submitted patch, 102468_nofollow.patch, failed testing.

bangalos’s picture

Status: Needs work » Needs review
StatusFileSize
new761 bytes

This time, I did a real git diff instead of regular diff.

bangalos’s picture

Version: 7.x-dev » 8.x-dev
StatusFileSize
new761 bytes

Applying the same patch to Drupal 8.

bangalos’s picture

Status: Needs review » Active

The "URL" Profile field no longer exists in Drupal 7 or Drupal 8! Even though the patch may apply, this issue is irrelevant IMHO. Detailed explanation follows:

In Drupal 6, there is Profile.

In Drupal 7, there is no admin interface to add URL field.

Is this a bug, or should we write a patch to remove this code?

bangalos’s picture

It looks like this issue depends on #501434: Move Link/URL field type into core which is newer and in drupal-8 queue.

The only reason to keep this code seems to be backwards-compatibility with drupal-6. So, a good patch to do would be to comment the code with this reason. Right?

laura s’s picture

ParisLiakos’s picture

Version: 8.x-dev » 7.x-dev

profile is not in 8.x now

Status: Active » Closed (outdated)

Automatically closed because Drupal 7 security and bugfix support has ended as of 5 January 2025. If the issue verifiably applies to later versions, please reopen with details and update the version.