Cliff
--You received this message because you are subscribed to the Google Groups "Joomla! General Development" group.To post to this group, send an email to joomla-de...@googlegroups.com.To unsubscribe from this group, send email to joomla-dev-gene...@googlegroups.com.For more options, visit this group at http://groups.google.com/group/joomla-dev-general?hl=en-GB.
Cliff
Nicholas K. Dionysopoulos wrote:
> Hello Cliff,
>
> You can always do this:
>
> if(!JRequest::getVar(JUtility::getToken(), false)) {
> // CRSF check failed; show a 403
> JError::raiseError('403', JText::_('Request Forbidden'));
> }
>
> You get the idea :)
>
> Best regards,
>
> --
> *Nicholas K. Dionysopoulos*
> Lead Developer, AkeebaBackup.com
>
> On Monday, 7 November 2011 at 11:57, Cliff Ford wrote:
>
>> I notice that JRequest::checkToken() is deprecated and is triggering Log
>> warnings in 1.7.2 but I can't find any information on what should be
>> used instead. Input does appear to have an equivalent function. Any
>> suggestions?
>>
>> Cliff
>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Joomla! General Development" group.
>> To post to this group, send an email to
>> joomla-de...@googlegroups.com
>> <mailto:joomla-de...@googlegroups.com>.
>> To unsubscribe from this group, send email to
>> joomla-dev-gene...@googlegroups.com
>> <mailto:joomla-dev-gene...@googlegroups.com>.
JRequest::getVar() is deprecated too! And my first message should have said 'Input does NOT have an equivalent function' [to JRequest::checkToken()]. And Jutility::getToken() is also deprecated. So what can we use that is not deprecated?
Cliff
Nicholas K. Dionysopoulos wrote:
Hello Cliff,*Nicholas K. Dionysopoulos*
You can always do this:
if(!JRequest::getVar(JUtility::getToken(), false)) {
// CRSF check failed; show a 403
JError::raiseError('403', JText::_('Request Forbidden'));
}
You get the idea :)
Best regards,
--
Lead Developer, AkeebaBackup.com
On Monday, 7 November 2011 at 11:57, Cliff Ford wrote:
I notice that JRequest::checkToken() is deprecated and is triggering Log
warnings in 1.7.2 but I can't find any information on what should be
used instead. Input does appear to have an equivalent function. Any
suggestions?
Cliff
--
You received this message because you are subscribed to the Google Groups "Joomla! General Development" group.
To post to this group, send an email to joomla-dev-general@googlegroups.com <mailto:joomla-dev-general@googlegroups.com>.
To unsubscribe from this group, send email to joomla-dev-general+unsub...@googlegroups.com <mailto:joomla-dev-general+unsub...@googlegroups.com>.
--
You received this message because you are subscribed to the Google Groups "Joomla! General Development" group.
To post to this group, send an email to joomla-dev-general@googlegroups.com.
To unsubscribe from this group, send email to joomla-dev-general+unsub...@googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "Joomla! General Development" group.
To post to this group, send an email to joomla-dev-general@googlegroups.com.
To unsubscribe from this group, send email to joomla-dev-general+unsub...@googlegroups.com.
* @deprecated 12.1 Get the JInput object from the application instead
Cliff
is JRequest::checkToken still deprecated?
I see that this is still used in almost every core component, and there does not seem to be an alternative. The deprecation notice in the checkToken method has been removed, but there's a deprecation notice on the entire JRequest class.
At this point I'm assuming that there is no alternative but to use it, but confirmation of this would be very useful - thanks!
Stephen
> --
> You received this message because you are subscribed to the Google Groups "Joomla! General Development" group.
> To post to this group, send an email to joomla-de...@googlegroups.com.
> To unsubscribe from this group, send email to joomla-dev-gene...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/joomla-dev-general?hl=en-GB.
>
Rouven
All that a deprecation notice does is tell you that this is something that will be removed in the future. It is giving you advance warning. It does not tell you when, just that you should be aware and prepare. Obviously it won't be removed until all of the APIs of JRequest are supported. But in the meantime, first you should be using JInput where you can now and second people can be thinking about code contributions to finish the work of JInput and also to make things as seamless as possible when JRequest is removed.
Elin--
You received this message because you are subscribed to the Google Groups "Joomla! General Development" group.
To view this discussion on the web, visit https://groups.google.com/d/msg/joomla-dev-general/-/hcqZQUDpBSIJ.
JInput has the major issue right now that it can't deal correctly with server where magic_quotes_gpc is turned on. Extension developers need to be really careful when using JInput since stuff may break unexpectedly based on the state of that parameter.
For Joomla 3.0 we'll probably just require magic_quotes_gpc to be off.
Rouven
This problem with magic_quotes_gpc sounds like a real killer. What does it mean to be "really careful" as a developer? It actually sounds like since there's no cure for the problem, that things are going to break with magic_quotes_gpc and JInput, and there may be nothing that I can do about it as a developer. Maybe all I can do is put up big warnings for users of my extensions, if magic_quotes_gpc is set, telling people to change it?
Anyway, I really appreciate your input on this Rouven. Thanks for all the info. Can you point to any other discussions about the magic_quotes_gpc issue?
Off to revert all my latest code changes, and go back to JRequest again...
Cheers,
Stephen
Rouven
php_value magic_quotes_gpc off
to the .htaccess file ?
Alfred
-----Oorspronkelijk bericht-----
Van: joomla-de...@googlegroups.com
[mailto:joomla-de...@googlegroups.com] Namens Rouven Weßling
Verzonden: donderdag 12 januari 2012 1:50
Aan: joomla-de...@googlegroups.com
Onderwerp: Re: [jgen] JRequest::checkToken() replacement
Rouven
--
Rouven
> Since there are security implications when turning this off (when you have other PHP scripts that rely on magic quotes) I'd rather not do that.
magic_quotes_gpc has been DEPRECATED as of PHP 5.3.0. Relying on this
feature is highly discouraged.
(http://de.php.net/manual/en/info.configuration.php#ini.magic-quotes-gpc)
Regards,
Niels
--
| http://barcamp-wk.de · 1. Barcamp Westküste 2./3. März 2012 |
| http://www.bsds.de · BSDS Braczek Software- und DatenSysteme |
| Webdesign · Webhosting · e-Commerce · Joomla! Content Management |
------------------------------------------------------------------
> Am 12.01.2012 15:44, schrieb Rouven Weßling:
>
>> Since there are security implications when turning this off (when you have other PHP scripts that rely on magic quotes) I'd rather not do that.
>
> magic_quotes_gpc has been DEPRECATED as of PHP 5.3.0. Relying on this
> feature is highly discouraged.
> (http://de.php.net/manual/en/info.configuration.php#ini.magic-quotes-gpc)
I'm aware of that. But just adding code to disable it to the .htaccess file (which may affect other scripts in the same folder) just doesn't sound like a thing we should do. Imagine what the user says whose server gets vulnerable because we changed a PHP setting without his knowing?
Rouven