fix XSS on opengraph tags
This commit is contained in:
@@ -44,12 +44,12 @@ func adType() int {
|
||||
// Intn returns a number up to n, but never n itself. So to get a random 0
|
||||
// or 1 we need to give it n=2. We can use this function to make other
|
||||
// splits like 1/3 1/4, etc
|
||||
switch i := rand.Intn(8); i {
|
||||
case 0, 1, 2, 3:
|
||||
switch i := rand.Intn(10); i {
|
||||
case 0, 1:
|
||||
return amarulaSolutions
|
||||
case 4, 5:
|
||||
case 2, 3, 4:
|
||||
return adMaven
|
||||
case 6, 7:
|
||||
case 5, 6, 7, 8, 9:
|
||||
return propellerAds
|
||||
default:
|
||||
panic(fmt.Errorf(
|
||||
@@ -282,7 +282,6 @@ func (wc *WebController) serveSkynetViewer(w http.ResponseWriter, r *http.Reques
|
||||
name = params["filename"]
|
||||
}
|
||||
|
||||
templateData.OGData = ""
|
||||
templateData.Title = fmt.Sprintf("name ~ Skynet")
|
||||
templateData.Other = viewerData{
|
||||
Type: "skylink",
|
||||
|
Reference in New Issue
Block a user