From 9664997a1391a4801d2cad663038fd2ed33fa2bf Mon Sep 17 00:00:00 2001 From: Brendan Taylor Date: Mon, 5 Sep 2011 14:03:07 +0000 Subject: new variable: enable_cross_file_access controls whether `file:` URIs are allowed to access other `file:` URIs. --- README | 2 ++ src/uzbl-core.h | 1 + src/variables.c | 3 +++ 3 files changed, 6 insertions(+) diff --git a/README b/README index 0d65084..dd3dc3a 100644 --- a/README +++ b/README @@ -364,6 +364,8 @@ file). * `enforce_96_dpi`: Enforce a resolution of 96 DPI (default 1). * `caret_browsing`: Whether the caret is enabled in the text portion of pages (default 0). +* `enable_cross_file_access`: Whether a page loaded from a `file://` URI can + access the contents of other `file://` URIs. (default 0). * `follow_hint_keys`: keys for keyboard-based navigation and link highlighting diff --git a/src/uzbl-core.h b/src/uzbl-core.h index c84380e..9aba992 100644 --- a/src/uzbl-core.h +++ b/src/uzbl-core.h @@ -189,6 +189,7 @@ typedef struct { guint enforce_96dpi; gchar *inject_html; guint caret_browsing; + guint cross_file_access; guint javascript_windows; gboolean print_version; diff --git a/src/variables.c b/src/variables.c index b72c4b0..a1063a0 100644 --- a/src/variables.c +++ b/src/variables.c @@ -321,6 +321,8 @@ EXPOSE_WEBKIT_VIEW_SETTINGS(enforce_96dpi, uzbl.behave.enforce_96dpi, "en EXPOSE_WEBKIT_VIEW_SETTINGS(caret_browsing, uzbl.behave.caret_browsing, "enable-caret-browsing") +EXPOSE_WEBKIT_VIEW_SETTINGS(cross_file_access, uzbl.behave.cross_file_access, "enable-file-access-from-file-uris") + EXPOSE_WEBKIT_VIEW_SETTINGS(default_encoding, uzbl.behave.default_encoding, "default-encoding") void @@ -588,6 +590,7 @@ const struct var_name_to_ptr_t { { "current_encoding", PTR_V_STR(uzbl.behave.current_encoding, 1, set_current_encoding)}, { "enforce_96_dpi", PTR_V_INT(uzbl.behave.enforce_96dpi, 1, cmd_enforce_96dpi)}, { "caret_browsing", PTR_V_INT(uzbl.behave.caret_browsing, 1, cmd_caret_browsing)}, + { "enable_cross_file_access", PTR_V_INT(uzbl.behave.cross_file_access, 1, cmd_cross_file_access)}, /* constants (not dumpable or writeable) */ { "WEBKIT_MAJOR", PTR_C_INT(uzbl.info.webkit_major, NULL)}, -- cgit v1.2.3