You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit b727f8f
Browse filesBrowse the repository at this point in the historyBrowse files
fix(service): forgive only what the code page mangled in a scheduler path
Reimplements #3067 (author @ntdatt812). The diagnosis is right and the
relocation is right: schtasks converts its XML through the console code page
before the bytes exist, so runFile reading as a buffer cannot help. A profile
named outside that page comes back as C:\Users\???\... and the exact
comparison rejected a registration this process had just created correctly,
so `ocx service install` rolled it back (#3064).
The remedy needed narrowing. #3067 compiles every unrepresentable run to
`[^\\/]*`, which forbids a path separator but allows arbitrary ASCII. A
segment that is ENTIRELY non-ASCII then has no anchors left, so
C:\Users\<CJK>\.opencodex\service-launcher.vbs
matches
C:\Users\Admin\.opencodex\service-launcher.vbs
and this process would adopt, repair, or delete another account's task. The
same hole applies to <UserId>, where MACHINE\<CJK> would match MACHINE\Admin.
Its tests use "Người", whose surviving Ng and i letters hide the case.
Here an unrepresentable run may match only a run of substitution characters --
'?' per character, U+FFFD, or nothing -- and every ASCII segment, including
every separator, is matched literally. A foreign account's path fails because
"admin" is not a run of substitutions.
Mutation-checked: widening the class back to `[^\\/]*` gives 186 pass /
1 fail, exactly "rejects another account's path that is merely the same shape".
Closes#3064.
0 commit comments