| <!-- | |
| Copyright 2021 The Go Authors. All rights reserved. | |
| Use of this source code is governed by a BSD-style | |
| license that can be found in the LICENSE file. | |
| --> | |
| {{define "pre-content"}} | |
| <link href="/static/frontend/vuln/vuln.min.css?version={{.AppVersionLabel}}" rel="stylesheet"> | |
| {{block "main-styles" .}}{{end}} | |
| {{end}} | |
| {{define "main"}} | |
| <main class="go-Container" id="main-content"> | |
| <div class="go-Content Vuln"> | |
| {{block "main-content" .}}{{end}} | |
| </div> | |
| </main> | |
| {{end}} | |
| {{define "vuln-details-short"}} | |
| {{/* . is Entry */}} | |
| <div class="Vuln-details"> | |
| {{template "vuln-details-metadata" .}} | |
| {{if .Withdrawn}} | |
| <p>(withdrawn)</p> | |
| {{else}} | |
| <p>{{.Details}}</p> | |
| {{end}} | |
| </div> | |
| {{end}} | |
| {{define "vuln-details-metadata"}} | |
| <ul class="Vuln-detailsMetadata"> | |
| {{with $aliases := .Aliases}} | |
| <li class="go-textSubtle Vuln-alias"> | |
| {{range $i, $v := $aliases}} | |
| {{- if lt $i 2}}{{- if ne $i 0}}, {{end -}}{{$v}}{{end -}} | |
| {{- if eq $i 2}}, and {{subtract (len $aliases) 2}} more{{end -}} | |
| {{end}} | |
| </li> | |
| {{end}} | |
| <li class="go-textSubtle">Affects: | |
| {{with $packages := .AffectedModulesAndPackages}} | |
| {{range $i, $name := $packages}} | |
| {{- if lt $i 2}}{{- if ne $i 0}}, {{end -}}{{$name}}{{end -}} | |
| {{- if eq $i 2}}, and {{subtract (len $packages) 2}} more{{end -}} | |
| {{end}} | |
| {{end}} | |
| </li> | |
| <li class="go-textSubtle">Published: {{.Published.Format "Jan 02, 2006"}}</li> | |
| {{if ne .Published .Modified}} | |
| <li class="go-textSubtle">Modified: {{.Modified.Format "Jan 02, 2006"}}</li> | |
| {{end}} | |
| {{with .Withdrawn}} | |
| <li class="go-textSubtle">Withdrawn: {{.Format "Jan 02, 2006"}}</li> | |
| {{end}} | |
| {{if .IsUnreviewed}} | |
| <li class="go-textSubtle">Unreviewed</li> | |
| {{end}} | |
| </ul> | |
| {{end}} | |
| {{define "vuln-search"}} | |
| <p> | |
| Data about new vulnerabilities come directly from Go package maintainers or sources such as MITRE | |
| and GitHub. Reports are curated by the Go Security team. Learn more at <a href="https://go.dev/security/vuln">go.dev/security/vuln</a>. | |
| </p> | |
| <h2>Search</h2> | |
| <form | |
| class="go-InputGroup VulnMain-search" | |
| action="/search" | |
| data-gtmc="search vuln" | |
| aria-label="Search GO IDs" | |
| role="search" | |
| > | |
| <input name="q" class="go-Input" placeholder="Search GO IDs" /> | |
| <button class="go-Button">Submit</button> | |
| </form> | |
| {{end}} | |
| {{define "vuln-chips"}} | |
| {{if .Withdrawn}} | |
| <span class="go-Chip go-Chip--subtle">withdrawn</span> | |
| {{end}} | |
| {{if .AffectsStandardLibrary}} | |
| <span class="go-Chip go-Chip-inverted">standard library</span> | |
| {{end}} | |
| {{end}} |