projects
/
fusionforge
/
fusionforge.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
project home
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e277708
)
Secure size of int to avoid risk of database integer overflow.
author
Alain Peyrat
<aljeux@free.fr>
Tue, 23 Mar 2010 19:51:39 +0000
(19:51 +0000)
committer
Alain Peyrat
<aljeux@free.fr>
Tue, 23 Mar 2010 19:51:39 +0000
(19:51 +0000)
gforge/common/include/escapingUtils.php
patch
|
blob
|
history
diff --git
a/gforge/common/include/escapingUtils.php
b/gforge/common/include/escapingUtils.php
index 035ed92fe87d0f0b092b7622c884a06961af751a..890a14f0582fafa77252d58efbdc2cb6ae5251a0 100644
(file)
--- a/
gforge/common/include/escapingUtils.php
+++ b/
gforge/common/include/escapingUtils.php
@@
-175,7
+175,8
@@
function getStringFromServer($key) {
* @return int the wanted value
*/
function _getIntFromArray(& $array, $key, $defaultValue = 0) {
- if(isset($array[$key]) && is_numeric($array[$key])) {
+ if(isset($array[$key]) && is_numeric($array[$key]) &&
+ $array[$key] <= 2147483647 && $array[$key] >= -2147483648 ) {
return (int) $array[$key];
}
elseif(is_numeric($defaultValue)) {