PropertyModifierFromAdSid: be more conservative

This commit is contained in:
Thomas Gelf 2016-03-16 18:05:03 +01:00
parent 81b2dca379
commit 5a045adbb4
1 changed files with 2 additions and 1 deletions

View File

@ -20,7 +20,8 @@ class PropertyModifierFromAdSid extends PropertyModifierHook
// https://blogs.msdn.microsoft.com/oldnewthing/20040315-00/?p=40253
$sid = $value;
$sidHex = unpack('H*hex', $value)['hex'];
$sidHex = unpack('H*hex', $value);
$sidHex = $sidHex['hex'];
$subAuths = implode('-', unpack('H2/H2/n/N/V*', $sid));
$revLevel = hexdec(substr($sidHex, 0, 2));