Closed Bug 1525419 Opened 7 years ago Closed 5 years ago

environment variables containing | cause errors

Categories

(Taskcluster :: Workers, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: dustin, Unassigned)

References

Details

Attachments

(1 file)

https://taskcluster-web.netlify.com/tasks/PPyVZMKHSCS0O8BvvD7WZg
has

Env: {
   ..
   "TRY_COMMIT_MSG": "Fuzzy query=android | linux | windows jittest\n\nPushed via `mach try fuzzy`",
}

and causes

'linux' is not recognized as an internal or external command,
operable program or batch file.

I think because it's not escaped in https://github.com/taskcluster/generic-worker/blob/ef584fdea9b9903dc1bb1e3e78b6233e5ca8f010/plat_windows.go#L309

This breaks mach try fuzzy as | is a common operator in its syntax.

I think this is a fairly recent regression, just based on the fact that I regularly use fuzzy and haven't run into this until yesterday.

It was a regression in how we handle commit messages in-tree (bug 1525421). That just happened to tickle this bug in generic-worker.

Component: Generic-Worker → Workers

Ouch. Do you happen to know if this is only a problem on Windows?

Flags: needinfo?(dustin)
See Also: → 1495760

I don't recall for sure, no, but given the link to plat_windows.go in comment 0 and given that generic-worker doesn't do any escaping or other handling of env var values on POSIX, I'd expect so.

Flags: needinfo?(dustin)
Assignee: nobody → pmoore
Status: NEW → ASSIGNED
QA Whiteboard: [lang=go]

Looks like I forgot to update this bug when it landed.

Assignee: pmoore → nobody
Status: ASSIGNED → NEW
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: