mirror of
https://github.com/silverstripe/silverstripe-blog
synced 2024-10-22 11:05:58 +02:00
Escape $stage
Although I don't *think* this is vulnerable, the $stage variable ultimately comes from a $_GET variable so should be escaped. Without this the security remains weak and could cause issues if the Versioned code is changed.
This commit is contained in:
parent
bfeddba670
commit
459468cc67
@ -23,6 +23,7 @@ class BlogFilter extends Lumberjack {
|
||||
$stage = '_' . $stage;
|
||||
}
|
||||
|
||||
$stage = Convert::raw2sql($stage);
|
||||
$dataQuery = $staged->dataQuery()
|
||||
->innerJoin('BlogPost', sprintf('"BlogPost%s"."ID" = "SiteTree%s"."ID"', $stage, $stage))
|
||||
->where(sprintf('"PublishDate" < \'%s\'', Convert::raw2sql(SS_Datetime::now())));
|
||||
|
Loading…
Reference in New Issue
Block a user