Re: com web/doc-editor: Fix Year ; add others auth service: scripts/utils/static_stats.php
| From: | Yannick Torrès | Date: | Thu, 07 Aug 2014 04:49:49 +0000 |
| Subject: | Re: com web/doc-editor: Fix Year ; add others auth service: scripts/utils/static_stats.php | ||
| References: | 1 2 | Groups: | php.doc.cvs |
| Request: | Send a blank email to doc-cvs+get-12710@lists.php.net to get a copy of this message | ||
Hi Kalle,
You're right ;)
Just fixed, thanks !
Best,
Yannick
2014-08-07 2:10 GMT+02:00 Kalle Sommer Nielsen <kalle@php.net>:
> Hi Yannick
>
> 2014-08-06 23:22 GMT+02:00 Yannick Torres <yannick@php.net>:
> > $year = ( isset($_GET['d']) ) ? $_GET['d'] :
> > $nowDate->format('Y');
>
> Shouldn't this be:
>
> $year = (isset($_GET['d']) ? (integer) $_GET['d'] :
> $nowDate->format('Y'));
>
> Instead to prevent sql injection, or does the DAL prevent that?
> (Didn't look deeply, just curious)
>
> >
> > $db = DBConnection::getInstance();
> >
> > -
> > -
> > $s = "select * from staticValue WHERE type='info' and
> YEAR(
date)='".$year."'";
> > $r = $db->query($s, array());
>
>
>
>
> --
> regards,
>
> Kalle Sommer Nielsen
> kalle@php.net
>