kgretzky/evilginx2 · error

edit: image url must be absolute

Error message

edit: image url must be absolute

What it means

In 'lures edit <id> og_image <value>', the provided image URL parsed but is not absolute (no scheme/host, e.g. a relative path). The Open Graph image URL must be a full absolute URL, so the edit is rejected and the lure is not updated.

Source

Thrown at core/terminal.go:994

					l.Info = val
					do_update = true
					log.Info("info = '%s'", l.Info)
				case "og_title":
					l.OgTitle = val
					do_update = true
					log.Info("og_title = '%s'", l.OgTitle)
				case "og_desc":
					l.OgDescription = val
					do_update = true
					log.Info("og_desc = '%s'", l.OgDescription)
				case "og_image":
					if val != "" {
						u, err := url.Parse(val)
						if err != nil {
							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 {

View on GitHub (pinned to 4c0988a1d9)

Solutions

  1. Provide a fully qualified URL: `lures edit 0 og_image https://example.com/og.png`
  2. Check the value starts with http:// or https:// before running the command
  3. Pass an empty string if the goal is to remove the og image

Example fix

// before
lures edit 0 og_image /static/og.png
// after
lures edit 0 og_image https://example.com/static/og.png
Defensive patterns

Strategy: validation

Validate before calling

u, err := url.Parse(val)
if err != nil || !u.IsAbs() {
    return errors.New("og_image must be absolute, e.g. https://example.com/og.png")
}

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_image must include scheme and host")
}

Prevention

When it happens

Trigger: Running `lures edit <id> og_image` with a relative or scheme-less value such as '/images/og.png' or 'example.com/og.png'.

Common situations: Configuring social-share preview images using a path relative to the phishing host instead of a fully qualified URL.

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/74d0a087fe0a7664. Report an issue: GitHub.