project urls (changelog, homepage, etc.) must be full URLs

crashtron - June 24, 2005 - 11:11
Project:Project
Version:5.x-1.x-dev
Component:Projects
Category:bug report
Priority:minor
Assigned:Unassigned
Status:active
Description

see topic

#1

killes@www.drop.org - June 24, 2005 - 16:08
Category:bug report» feature request

That's not a bug.

#2

drewish - July 12, 2007 - 22:42
Version:x.y.z» 5.x-1.x-dev
Priority:normal» minor

still applies, changelog must be a complete url.

#3

aclight - July 13, 2007 - 23:06
Title:change-log url could not be a node (must be complete url)a» project urls (changelog, homepage, etc.) must be full URLs

Marked http://drupal.org/node/157759 as a duplicate of this issue

Changing title to broaden the scope of the issue a bit, since changelog, homepage, demo, and cvs tree are all treated the same in project_project_validate()

#4

drinkypoo - September 7, 2007 - 16:38

Well anyway, since my entry was marked dup (sorry) I want to put my weight behind this one.

It really makes no sense to not support drupal paths. In this comment the function for validating paths is shown. It is stated that it does pretty much the same thing the valid_url function does. So I have two questions:

1) why not just use valid_url() ?
2) why is it a problem to check if the path is a valid drupal path, then to check if it is a valid_url(), and then fail it if it is neither of these things? then when creating the link, just check to see if it's a valid_url() each time and display as an internal link if not. the overhead can't be that heavy.

The function currently used doesn't actually do any validation and it will not fail on TONS of completely invalid URLs. I don't know if the same is true of the API function but perhaps it will one day actually do validation... and then this module will as well. This is the whole point of having core APIs!

But finally, it is very likely that the project homepage will be on the same site as the project page, and not at all unlikely that the site will be accessible as multiple names. But more important is the idea that your nodes should not require any modification between your live and testing server, so that you can pull snapshots of your site and use them for testing without any modification. Right now my testing server (which will be going live eventually, directly from this copy) has to have paths beginning with "http://localhost" in the project module if these links are to work on the test server. When I go live, I will have to edit each of these manually! So providing this basic drupal functionality is a huge win for the module, and a necessity from a testing standpoint. I'm not changing anything here but I take exception to the idea that this is a minor feature request - or perhaps it's a instead a minor bug report.

#5

aclight - April 13, 2008 - 00:12

As a note, #218571: add hook_project_page_link_alter(), implement to add security link to all project pages may be of some use to you here. You could always write a module that would handle the links itself, instead of relying on the project module. Of course, it's probably faster to just provide a patch for this issue :)

#6

aclight - April 13, 2008 - 00:24

#140364: relative URL's in URL fields (e.g.homepage) was marked a duplicate of this issue.

#7

aclight - May 4, 2008 - 21:51
Category:feature request» bug report

I noticed that we're no validating the URLs for license and screenshot at all, and that, unlike valid_url, we're not putting a list of allowed characters into the regexp. The final value of the URL is passed through l(), so I don't think we have a security problem, but I think we should be consistent with how we validate the URLs also use the drupal valid_url() function instead of handling the validation on our own.

I'm not sure there's a good argument for not allowing relative links, but maybe there is one. If we want to allow them (like we already are for license and screenshots), we can still use valid_url(), so either way we'll make project_project_validate() a tiny bit simpler.

I'm changing this to a bug report because the screenshot and license URL aren't validated at all.

Any thoughts?

#8

VVS - September 23, 2009 - 17:24

URLs in Documentation, Screenshot - too!

 
 

Drupal is a registered trademark of Dries Buytaert.