kgretzky/evilginx2 · error
edit: site url must be absolute
Error message
edit: site url must be absolute
What it means
In 'lures edit <id> og_url <value>', the provided site URL parsed but is not absolute (missing scheme like https://). The Open Graph og:url value must be a full absolute URL, so the edit is rejected and the lure is not updated.
Source
Thrown at core/terminal.go:1009
return fmt.Errorf("edit: %v", err)
}
if !u.IsAbs() {
return fmt.Errorf("edit: image url must be absolute")
}
l.OgImageUrl = u.String()
} else {
l.OgImageUrl = ""
}
do_update = true
log.Info("og_image = '%s'", l.OgImageUrl)
case "og_url":
if val != "" {
u, err := url.Parse(val)
if err != nil {
return fmt.Errorf("edit: %v", err)
}
if !u.IsAbs() {
return fmt.Errorf("edit: site url must be absolute")
}
l.OgUrl = u.String()
} else {
l.OgUrl = ""
}
do_update = true
log.Info("og_url = '%s'", l.OgUrl)
case "redirector":
if val != "" {
path := val
if !filepath.IsAbs(val) {
redirectors_dir := t.cfg.GetRedirectorsDir()
path = filepath.Join(redirectors_dir, val)
}
if _, err := os.Stat(path); !os.IsNotExist(err) {
l.Redirector = val
} else {View on GitHub (pinned to 4c0988a1d9)
Solutions
- Use a fully qualified URL: `lures edit 0 og_url https://example.com`
- Validate the value parses and IsAbs() is true beforehand
- Pass an empty string to clear the og_url
Example fix
// before lures edit 0 og_url example.com // after lures edit 0 og_url https://example.com
Defensive patterns
Strategy: validation
Validate before calling
u, err := url.Parse(val)
if err != nil || !u.IsAbs() {
return errors.New("og_url must be absolute, e.g. https://example.com")
} Type guard
func isAbsoluteURL(s string) bool {
u, err := url.Parse(s)
return err == nil && u.IsAbs()
} Try / catch
if !isAbsoluteURL(val) {
return errors.New("og_url must include scheme and host")
} Prevention
- Include https:// in og_url values
- Do not use bare hostnames or paths
- Pass an empty string to clear og_url
When it happens
Trigger: Running `lures edit <id> og_url` with a scheme-less value like 'example.com' or a path-only value.
Common situations: Setting the OG url tag from a bare hostname, forgetting https:// when configuring social-preview metadata for a lure.
Understand the failure class
Background: "Invalid URL" errors: why new URL(), URI.parse, and reqwest::Url reject your string — missing scheme, whitespace, and bad path format — this error's family across 39 libraries.
Related errors
- edit: image url must be absolute
- edit: redirect url must be absolute
- edit: redirector directory does not exist: %s
- delete: %v
- command not found
AI-assisted analysis of kgretzky/evilginx2@4c0988a1d9 (2026-09-05).
Data as JSON: /api/errors/3963a3903458b58b.
Report an issue: GitHub.