-
0
- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
// CVE-2012-5692
/* 4015. */ static public function get($name)
/* 4016. */ {
/* 4017. */ // Check internal data first
/* 4018. */ if ( isset( self::$_cookiesSet[ $name ] ) )
/* 4019. */ {
/* 4020. */ return self::$_cookiesSet[ $name ];
/* 4021. */ }
/* 4022. */ else if ( isset( $_COOKIE[ipsRegistry::$settings['cookie_id'].$name] ) )
/* 4023. */ {
/* 4024. */ $_value = $_COOKIE[ ipsRegistry::$settings['cookie_id'].$name ];
/* 4025. */
/* 4026. */ if ( substr( $_value, 0, 2 ) == 'a:' )
/* 4027. */ {
/* 4028. */ return unserialize( stripslashes( urldecode( $_value ) ) );
/* 4029. */ }
/*
The vulnerability is caused due to this method unserialize user input passed through cookies without a proper
sanitization. The only one check is done at line 4026, where is controlled that the serialized string starts
with 'a:', but this is not sufficient to prevent a "PHP Object Injection" because an attacker may send a
serialized string which represents an array of objects. This can be exploited to execute arbitrary PHP code
via the "__destruct()" method of the "dbMain" class, which calls the "writeDebugLog" method to write debug
info into a file. PHP code may be injected only through the $_SERVER['QUERY_STRING'] variable, for this
reason successful exploitation of this vulnerability requires short_open_tag to be enabled.
*/
Если вы думаете, что самое плохое, что ждёт ваш уютный сайт на «PHP» — это Роберт-брось-таблицу, то вы глубоко ошибаетесь.
CSRF verification passed.
gost,
23 Сентября 2018
-
−2
- 1
https://habr.com/post/423889/
Публикация отхватила неебическое количество плюсов.
LinuxGovno,
21 Сентября 2018
-
0
- 1
return x > 0 and true or false
imring,
21 Сентября 2018
-
−1
- 1
- 2
- 3
- 4
const (
millisPerSecond = int64(time.Second / time.Millisecond)
nanosPerMillisecond = int64(time.Millisecond / time.Nanosecond)
)
Автор предусмотрел возможность изменения СИ.
cheshir,
21 Сентября 2018
-
−3
- 1
Внимайте мне, Земли обитатели!
Я открою вам истину, которую веками скрывали от вас – число ноль является ничем иным как выдумкой враждебной к вам Галактической Империи. Он является лишь помехой в вычислениях, и привел к деградации вашей цивилизации. Откажитесь от него! И математика простой и понятной станет, и вам путь к просветлению и силе откроется!
MasterJoda,
21 Сентября 2018
-
−1
- 1
- 2
- 3
- 4
if len(item['createdOn']):
item['createdOn'] = strptime(item['createdOn'], '%Y.%m.%d %H:%M:%S')
else:
del item['createdOn']
mef1stofel,
21 Сентября 2018
-
0
- 1
- 2
- 3
- 4
- 5
- 6
- 7
NaN = 5;
console.log(NaN); // NaN
undefined = 5;
console.log(undefined); // undefined
0 = 5; // Uncaught ReferenceError: Invalid left-hand side in assignment
guestinxo,
21 Сентября 2018
-
+2
- 1
- 2
- 3
- 4
template <class F, class G>
auto operator*(F&& f, G&& g) -> decltype(auto) {
return [=](auto ...args) { return f(g(args...)); };
}
Композиция функций
IBets,
21 Сентября 2018
-
0
- 1
- 2
//Breakpoint
bool[] bp = new bool[1]; bp[1] = true;
Чувак сказал, что так ему удобнее.
jdryand,
19 Сентября 2018
-
−4
- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
#include <iostream>
using namespace std;
int main()
{
bool s;
if (s == true) {
return true;
}
if (s == false) {
return false;
}
else {
return !true && !false;
}
}
Настоящие программисты пишут вот так!
Verenick,
19 Сентября 2018