This repository was archived by the owner on Sep 19, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 8 files changed +52
-32
lines changed
Expand file tree Collapse file tree 8 files changed +52
-32
lines changed Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ All notable changes to this project will be documented in this file.
88- Removed unused include from 'templates/spDetail-tpl.php'
99- Deleted useless code
1010- Deleted 'head' and 'body' tag in tab templates
11+ - Use 'filter_input' to GET and VALIDATE value send as GET/POST param
1112
1213#### Fixed
1314- Fixed the syntax of CHANGELOG
Original file line number Diff line number Diff line change 3434
3535$ this ->includeAtTemplateBase ('includes/header.php ' );
3636
37- if (!isset ($ _POST ['lastDays ' ])) {
38- $ _POST ['lastDays ' ] = 0 ;
37+ if (!isset ($ this -> data ['lastDays ' ])) {
38+ $ this -> data ['lastDays ' ] = 0 ;
3939}
4040
41- if (!isset ($ _POST ['tab ' ])) {
42- $ _POST ['tab ' ] = 1 ;
41+ if (!isset ($ this -> data ['tab ' ])) {
42+ $ this -> data ['tab ' ] = 1 ;
4343}
4444
4545?>
4646
4747<div id="tabdiv">
4848 <ul class="tabset_tabs" width="100px">
4949 <li><a id="tab-1"
50- href='<?php echo "summary.php?lastDays= " . $ _POST ['lastDays ' ]; ?> '>
50+ href='<?php echo "summary.php?lastDays= " . $ this -> data ['lastDays ' ]; ?> '>
5151 <?php echo $ this ->t ('{proxystatistics:Proxystatistics:summary} ' ); ?> </a>
5252 </li>
5353 <li><a id="tab-2"
54- href='<?php echo "identityProviders.php?lastDays= " . $ _POST ['lastDays ' ]; ?> '>
54+ href='<?php echo "identityProviders.php?lastDays= " . $ this -> data ['lastDays ' ]; ?> '>
5555 <?php echo $ this ->t ('{proxystatistics:Proxystatistics:templates/statistics-tpl_idpsDetail} ' ); ?> </a>
5656 </li>
5757 <li><a id="tab-3"
58- href='<?php echo "serviceProviders.php?lastDays= " . $ _POST ['lastDays ' ]; ?> '>
58+ href='<?php echo "serviceProviders.php?lastDays= " . $ this -> data ['lastDays ' ]; ?> '>
5959 <?php echo $ this ->t ('{proxystatistics:Proxystatistics:templates/statistics-tpl_spsDetail} ' ); ?> </a>
6060 </li>
6161 </ul>
Original file line number Diff line number Diff line change 1212$ session = Session::getSessionFromRequest ();
1313
1414$ t = new Template ($ config , 'proxystatistics:identityProviders-tpl.php ' );
15- $ t ->data ['lastDays ' ] = $ _GET ['lastDays ' ];
15+ $ t ->data ['lastDays ' ] = filter_input (
16+ INPUT_GET ,
17+ 'lastDays ' ,
18+ FILTER_VALIDATE_INT ,
19+ ['options ' =>['default ' =>0 ,'min_range ' =>0 ]]
20+ );
1621$ t ->show ();
Original file line number Diff line number Diff line change 1313
1414$ t = new Template ($ config , 'proxystatistics:idpDetail-tpl.php ' );
1515
16- if (!isset ($ _POST ['lastDays ' ])) {
17- $ _POST ['lastDays ' ] = 0 ;
18- }
19- $ t ->data ['lastDays ' ] = $ _POST ['lastDays ' ];
20- $ t ->data ['entityId ' ] = $ _GET ['entityId ' ];
16+ $ t ->data ['lastDays ' ] = filter_input (
17+ INPUT_POST ,
18+ 'lastDays ' ,
19+ FILTER_VALIDATE_INT ,
20+ ['options ' =>['default ' =>0 ,'min_range ' =>0 ]]
21+ );
22+ $ t ->data ['entityId ' ] = filter_input (INPUT_GET , 'entityId ' , FILTER_SANITIZE_STRING );
2123$ t ->show ();
Original file line number Diff line number Diff line change 1212$ session = Session::getSessionFromRequest ();
1313
1414$ t = new Template ($ config , 'proxystatistics:statistics-tpl.php ' );
15-
16- if (!isset ($ _POST ['lastDays ' ])) {
17- $ _POST ['lastDays ' ] = 0 ;
18- }
19-
20- if (!isset ($ _POST ['tab ' ])) {
21- $ _POST ['tab ' ] = 1 ;
22- }
23-
24- $ t ->data ['lastDays ' ] = $ _POST ['lastDays ' ];
25- $ t ->data ['tab ' ] = $ _POST ['tab ' ];
15+ $ t ->data ['lastDays ' ] = filter_input (
16+ INPUT_POST ,
17+ 'lastDays ' ,
18+ FILTER_VALIDATE_INT ,
19+ ['options ' =>['default ' =>0 ,'min_range ' =>0 ]]
20+ );
21+ $ t ->data ['tab ' ] = filter_input (
22+ INPUT_POST ,
23+ 'tab ' ,
24+ FILTER_VALIDATE_INT ,
25+ ['options ' =>['default ' =>0 ,'min_range ' =>1 ]]
26+ );
2627$ t ->show ();
Original file line number Diff line number Diff line change 1212$ session = Session::getSessionFromRequest ();
1313
1414$ t = new Template ($ config , 'proxystatistics:serviceProviders-tpl.php ' );
15- $ t ->data ['lastDays ' ] = $ _GET ['lastDays ' ];
15+ $ t ->data ['lastDays ' ] = filter_input (
16+ INPUT_GET ,
17+ 'lastDays ' ,
18+ FILTER_VALIDATE_INT ,
19+ ['options ' =>['default ' =>0 ,'min_range ' =>0 ]]
20+ );
1621$ t ->show ();
Original file line number Diff line number Diff line change 1313
1414$ t = new Template ($ config , 'proxystatistics:spDetail-tpl.php ' );
1515
16- if (!isset ($ _POST ['lastDays ' ])) {
17- $ _POST ['lastDays ' ] = 0 ;
18- }
19-
20- $ t ->data ['lastDays ' ] = $ _POST ['lastDays ' ];
21- $ t ->data ['identifier ' ] = $ _GET ['identifier ' ];
16+ $ t ->data ['lastDays ' ] = filter_input (
17+ INPUT_POST ,
18+ 'lastDays ' ,
19+ FILTER_VALIDATE_INT ,
20+ ['options ' =>['default ' =>0 ,'min_range ' =>0 ]]
21+ );
22+ $ t ->data ['identifier ' ] = filter_input (INPUT_GET , 'identifier ' , FILTER_SANITIZE_STRING );
2223$ t ->show ();
Original file line number Diff line number Diff line change 1212$ session = Session::getSessionFromRequest ();
1313
1414$ t = new Template ($ config , 'proxystatistics:summary-tpl.php ' );
15- $ t ->data ['lastDays ' ] = $ _GET ['lastDays ' ];
15+ $ t ->data ['lastDays ' ] = filter_input (
16+ INPUT_GET ,
17+ 'lastDays ' ,
18+ FILTER_VALIDATE_INT ,
19+ ['options ' =>['default ' =>0 ,'min_range ' =>0 ]]
20+ );
1621$ t ->show ();
You can’t perform that action at this time.
0 commit comments