? Pending

User tests: Successful: Unsuccessful:

avatar PhilETaylor
PhilETaylor
18 May 2021

you can't just append a type and hope Joomla converts to that type haha - fake security, the method call doesn't have this additional param

code review

avatar PhilETaylor PhilETaylor - open - 18 May 2021
avatar PhilETaylor PhilETaylor - change - 18 May 2021
Status New Pending
avatar richard67
richard67 - comment - 18 May 2021
avatar PhilETaylor
PhilETaylor - comment - 18 May 2021

This is set, you linked to get

avatar richard67
richard67 - comment - 18 May 2021

Oh ... I need sleep. For set you are right.

avatar PhilETaylor PhilETaylor - change - 19 May 2021
Labels Added: ?
avatar PhilETaylor
PhilETaylor - comment - 20 May 2021

No idea - but it is clear what was there before was clearly wrong and needs addressing. If this PR is incorrect, it doesnt change the fact that the current code is wrong :)

avatar joomdonation
joomdonation - comment - 23 May 2021

Tried to look at it again but unsure what to do :(. I don't know why we need to attempt to get data from $this->input and if it does not exist, try to get it from $this->input->get ?

Isn't $this->input contains data from both POST and GET already? Or there is something special here :( ? In ArticlesController for example, we do not need to use $this->input->get at all. See https://github.com/joomla/joomla-cms/blob/4.0-dev/api/components/com_content/src/Controller/ArticlesController.php#L48-L79 .

avatar wilsonge
wilsonge - comment - 23 May 2021

Honestly right now I can’t remember why this would be either. Pretty sure we just want to be checking GET. Will look again tomorrow with a fresh pair of eyes

avatar joomdonation
joomdonation - comment - 24 May 2021

@wilsonge Now I understand more about webservice, I think just getting data from GET would be right. However, for shorter code, using just $this->input->get instead of $this->input->get->get could work, too. The code here could be simplified.

avatar wilsonge
wilsonge - comment - 24 May 2021

However, for shorter code, using just $this->input->get instead of $this->input->get->get could work, too

It can work but would allow query overriding which would be wrong. For the API we generally should be fairly strict about the data sources.

avatar joomdonation
joomdonation - comment - 2 Jun 2021

This PR should be updated to use same method with #34288 . We do not want to individual model states like this anymore.

avatar PhilETaylor PhilETaylor - change - 15 Aug 2021
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2021-08-15 12:30:18
Closed_By PhilETaylor
Labels Added: ?
Removed: ?
avatar PhilETaylor PhilETaylor - close - 15 Aug 2021
avatar PhilETaylor
PhilETaylor - comment - 15 Aug 2021

Closing as no possibility of being merged.

Add a Comment

Login with GitHub to post a comment