? Success

User tests: Successful: Unsuccessful:

avatar PhilETaylor
PhilETaylor
26 Oct 2016

Summary of Changes

Remove completed TODO comment in source code

It appears that someone has already implemented the feature that the TODO states needs to be "to done" - so removing the todo item to stop it showing up in sensible IDEs

Testing Instructions

none

Documentation Changes Required

none

avatar PhilETaylor PhilETaylor - open - 26 Oct 2016
avatar PhilETaylor PhilETaylor - change - 26 Oct 2016
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 26 Oct 2016
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - change - 26 Oct 2016
Category Administration Components
avatar brianteeman
brianteeman - comment - 26 Oct 2016

Nope - its not done
all the code does is check that - customurl is not just "not empty".

It still does not
check if the customurl is valid and not just "not empty".

avatar PhilETaylor
PhilETaylor - comment - 26 Oct 2016

yes but define "valid" ?

The validation should be done at the time of saving a custom url to the db - not at the time of using it.

avatar brianteeman
brianteeman - comment - 26 Oct 2016

No idea how to define valid BUT its still a todo

avatar dgt41
dgt41 - comment - 26 Oct 2016
if (filter_var(trim($params->get('customurl', ''), FILTER_VALIDATE_URL) === true)

@PhilETaylor this should do exactly that

avatar PhilETaylor
PhilETaylor - comment - 26 Oct 2016

screen shot 2016-10-26 at 23 34 11

If you enter an invalid url then its still fine, it fails gracefully.

avatar PhilETaylor PhilETaylor - change - 26 Oct 2016
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2016-10-26 22:36:02
Closed_By PhilETaylor
avatar PhilETaylor PhilETaylor - close - 26 Oct 2016
avatar PhilETaylor PhilETaylor - close - 26 Oct 2016
avatar brianteeman
brianteeman - comment - 26 Oct 2016

thats an invalid url but I read the todo as suggesting it should be testing for a genuine url and not something like joornla.org

avatar dgt41
dgt41 - comment - 26 Oct 2016

@brianteeman this one maybe?

try
{
simplexml_load_string(file_get_contents($url))
}
catch
//error
}
avatar PhilETaylor
PhilETaylor - comment - 26 Oct 2016

Data should be validated before it gets to the database, not just on retrieving it from the database. This file is the wrong place for basic validation checks period.

avatar brianteeman
brianteeman - comment - 26 Oct 2016

thats why its a todo ;)

On 26 October 2016 at 23:42, Phil Taylor notifications@github.com wrote:

Data should be validated before it gets to the database, not on retrieving
it from the database. This file is the wrong place for basic validation
checks period.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#12582 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABPH8YeuCqKk0_1TdjzclrjK5swPTYILks5q39dtgaJpZM4Khvg-
.

Brian Teeman
Co-founder Joomla! and OpenSourceMatters Inc.
https://brian.teeman.net/ http://brian.teeman.net/

avatar brianteeman
brianteeman - comment - 27 Oct 2016

how does that stop me using http://update.joornla.org/

On 26 October 2016 at 23:41, Dimitri Grammatikogianni <
notifications@github.com> wrote:

@brianteeman https://github.com/brianteeman this one maybe?

try{simplexml_load_string(file_get_contents($url))}catch//error}


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#12582 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABPH8a3L23Ha2pHoFOHu3E3w_F39S4Gfks5q39cmgaJpZM4Khvg-
.

Brian Teeman
Co-founder Joomla! and OpenSourceMatters Inc.
https://brian.teeman.net/ http://brian.teeman.net/

Add a Comment

Login with GitHub to post a comment