{"action":"created","issue":{"url":"https://api.github.com/repos/PowerShell/xPSDesiredStateConfiguration/issues/301","repository_url":"https://api.github.com/repos/PowerShell/xPSDesiredStateConfiguration","labels_url":"https://api.github.com/repos/PowerShell/xPSDesiredStateConfiguration/issues/301/labels{/name}","comments_url":"https://api.github.com/repos/PowerShell/xPSDesiredStateConfiguration/issues/301/comments","events_url":"https://api.github.com/repos/PowerShell/xPSDesiredStateConfiguration/issues/301/events","html_url":"https://github.com/PowerShell/xPSDesiredStateConfiguration/issues/301","id":197493987,"number":301,"title":"xRegistry - writing binary data with '00' seems to have strange effects","user":{"login":"marcinbojko","id":4726723,"avatar_url":"https://avatars.githubusercontent.com/u/4726723?v=3","gravatar_id":"","url":"https://api.github.com/users/marcinbojko","html_url":"https://github.com/marcinbojko","followers_url":"https://api.github.com/users/marcinbojko/followers","following_url":"https://api.github.com/users/marcinbojko/following{/other_user}","gists_url":"https://api.github.com/users/marcinbojko/gists{/gist_id}","starred_url":"https://api.github.com/users/marcinbojko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marcinbojko/subscriptions","organizations_url":"https://api.github.com/users/marcinbojko/orgs","repos_url":"https://api.github.com/users/marcinbojko/repos","events_url":"https://api.github.com/users/marcinbojko/events{/privacy}","received_events_url":"https://api.github.com/users/marcinbojko/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-12-25T09:29:32Z","updated_at":"2017-02-16T18:59:35Z","closed_at":null,"body":"When we try to write data using xRegistry like in example:\r\n\r\n```yaml\r\ntightvncpassword:\r\n  dsc_key: HKEY_LOCAL_MACHINE\\SOFTWARE\\TightVNC\\Server\r\n  dsc_valuename: Password\r\n  dsc_hex: true\r\n  dsc_valuedata: 00 00 00 00 00 00 00 00\r\n  dsc_valuetype: binary\r\n```\r\n\r\nSetting registry values has different effect if we are going to use '00' or not.\r\nLet's say we want to set value to: 'aabbccdd'\r\n\r\nWe'll have:\r\n\r\n> VERBOSE: [WIN-LO53EUODSPV]:                            [[xRegistry]DirectResourceAccess] (SET) Set registry key value 'HKLM:\\SOFTWARE\\TightVNC\\Server\\ControlPassword' to \r\n> '(170, 187, 204, 221)' of type 'binary'\r\n\r\nLet's change our value to: '00bbccdd'\r\n\r\n> VERBOSE: [WIN-LO53EUODSPV]:                            [[xRegistry]DirectResourceAccess] (SET) Set registry key value 'HKLM:\\SOFTWARE\\TightVNC\\Server\\ControlPassword' to \r\n> '(187, 204, 221)' of type 'binary'\r\n\r\nFirst '00' get's trimmed to ''.\r\nSingle '0' instead of '00' ?\r\nSame effect.\r\nWhat about line of zeroes like: '00000000'?\r\n\r\n> VERBOSE: [WIN-LO53EUODSPV]:                            [[xRegistry]DirectResourceAccess] (SET) Set registry key value 'HKLM:\\SOFTWARE\\TightVNC\\Server\\ControlPassword' to \r\n> '()' of type 'binary'\r\n\r\nValue: 'aabbcc00dd000000' - seems to be legit.\r\n\r\n> VERBOSE: [WIN-LO53EUODSPV]:                            [[xRegistry]DirectResourceAccess] (SET) Set registry key value 'HKLM:\\SOFTWARE\\TightVNC\\Server\\ControlPassword' to \r\n> '(170, 187, 204, 0, 221, 0, 0, 0)' of type 'binary'\r\n> \r\n\r\nLooks like we have problem if the first byte in binary is '00' or '0'"},"comment":{"url":"https://api.github.com/repos/PowerShell/xPSDesiredStateConfiguration/issues/comments/280425096","html_url":"https://github.com/PowerShell/xPSDesiredStateConfiguration/issues/301#issuecomment-280425096","issue_url":"https://api.github.com/repos/PowerShell/xPSDesiredStateConfiguration/issues/301","id":280425096,"user":{"login":"kwirkykat","id":6372220,"avatar_url":"https://avatars.githubusercontent.com/u/6372220?v=3","gravatar_id":"","url":"https://api.github.com/users/kwirkykat","html_url":"https://github.com/kwirkykat","followers_url":"https://api.github.com/users/kwirkykat/followers","following_url":"https://api.github.com/users/kwirkykat/following{/other_user}","gists_url":"https://api.github.com/users/kwirkykat/gists{/gist_id}","starred_url":"https://api.github.com/users/kwirkykat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kwirkykat/subscriptions","organizations_url":"https://api.github.com/users/kwirkykat/orgs","repos_url":"https://api.github.com/users/kwirkykat/repos","events_url":"https://api.github.com/users/kwirkykat/events{/privacy}","received_events_url":"https://api.github.com/users/kwirkykat/received_events","type":"User","site_admin":false},"created_at":"2017-02-16T18:59:35Z","updated_at":"2017-02-16T18:59:35Z","body":"@marcinbojko Not sure puppetlabs-dsc has updated to either of the more recent versions yet (looks like they are still on 5.0.0.0). But yes this issue should be fixed in 5.1.0.0+. We have also added tests for the binary 0 case now to make sure this functionality doesn't regress. You ok with closing this issue?"}}
{"actor":{"display_login":"kwirkykat"}}