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

  1. Use a fully qualified URL: `lures edit 0 og_url https://example.com`
  2. Validate the value parses and IsAbs() is true beforehand
  3. 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

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


AI-assisted analysis of kgretzky/evilginx2@4c0988a1d9 (2026-09-05). Data as JSON: /api/errors/3963a3903458b58b. Report an issue: GitHub.