Docker Community Forums

Share and learn in the Docker community.

JS error if container logs contains html tag


(Meszarosl) #1

I guess UCP tries to sanitize the logs instead escape and sanitize. But thats just a guess.

Steps to reproduce:

  1. Start an official jenkins container.
  2. On the jenkins webinterface create a job with valid svn or git repo
  3. Save created job.
  4. Go to UCP/containers and choose the jenkins one

Actual:

JS error appears in dev console:

“Error: [$sanitize:badparse] The sanitizer was unable to parse the following block of html: svn://repo-url:repo-port f7a5b55d-1baf-4991-8e75-59219a20dadf
2015-12-11T09:37:44.818884334Z Dec 11, 2015 9:37:44 AM hudson.model.Run execute
2015-12-11T09:37:44.819748915Z INFO: node-test #1 main build action completed: SUCCESS”

It is definitly from the jenkins log.
And when I check the logs via cli. The following line is in it: “INFO: Persisted hudson.scm.SubversionSCM$DescriptorImpl$PasswordCredential@58c8b7b6 for svn://repo-url:repo-port f7a5b55d-1baf-4991-8e75-59219a20dadf”

Unfortunatelly in that case the logs doesn’t appears on UCP when click on it.

Expected:

No js error and when I click on logs the logs appears properly.


(Thomas Barlow) #2

Thanks for the report! Going to try to reproduce and fix this.