mirror of
				https://github.com/juanfont/headscale.git
				synced 2025-10-28 10:51:44 +01:00 
			
		
		
		
	Merge pull request #368 from kradalby/apple-profile-fix
Fix apple profile issue being generated with escaped characters
This commit is contained in:
		
						commit
						4a9fd3a680
					
				@ -4,6 +4,7 @@ import (
 | 
			
		||||
	"bytes"
 | 
			
		||||
	"html/template"
 | 
			
		||||
	"net/http"
 | 
			
		||||
	textTemplate "text/template"
 | 
			
		||||
 | 
			
		||||
	"github.com/gin-gonic/gin"
 | 
			
		||||
	"github.com/gofrs/uuid"
 | 
			
		||||
@ -202,8 +203,8 @@ type AppleMobilePlatformConfig struct {
 | 
			
		||||
	URL  string
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
var commonTemplate = template.Must(
 | 
			
		||||
	template.New("mobileconfig").Parse(`<?xml version="1.0" encoding="UTF-8"?>
 | 
			
		||||
var commonTemplate = textTemplate.Must(
 | 
			
		||||
	textTemplate.New("mobileconfig").Parse(`<?xml version="1.0" encoding="UTF-8"?>
 | 
			
		||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
 | 
			
		||||
<plist version="1.0">
 | 
			
		||||
  <dict>
 | 
			
		||||
@ -229,7 +230,7 @@ var commonTemplate = template.Must(
 | 
			
		||||
</plist>`),
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
var iosTemplate = template.Must(template.New("iosTemplate").Parse(`
 | 
			
		||||
var iosTemplate = textTemplate.Must(textTemplate.New("iosTemplate").Parse(`
 | 
			
		||||
    <dict>
 | 
			
		||||
        <key>PayloadType</key>
 | 
			
		||||
        <string>io.tailscale.ipn.ios</string>
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user