Gitweb links:

...log 
http://git.netsurf-browser.org/netsurf.git/shortlog/5063fc838e9933b73bf6c8d2f330e5a8e53d7544
...commit 
http://git.netsurf-browser.org/netsurf.git/commit/5063fc838e9933b73bf6c8d2f330e5a8e53d7544
...tree 
http://git.netsurf-browser.org/netsurf.git/tree/5063fc838e9933b73bf6c8d2f330e5a8e53d7544

The branch, master has been updated
       via  5063fc838e9933b73bf6c8d2f330e5a8e53d7544 (commit)
       via  715586bb6548ca9281aa88abadec328272eb585f (commit)
       via  33c81b69325ecd0686477916c2d0a1c590eba773 (commit)
       via  2e07d955b6489ac7d98708deb58adef1cb98d67a (commit)
       via  868c42b34493fdee2a44db68f04aa7f198afc096 (commit)
      from  08e2cc32bab262979126837b82de6db2922b9afb (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commitdiff 
http://git.netsurf-browser.org/netsurf.git/commit/?id=5063fc838e9933b73bf6c8d2f330e5a8e53d7544
commit 5063fc838e9933b73bf6c8d2f330e5a8e53d7544
Author: Daniel Silverstone <[email protected]>
Commit: Daniel Silverstone <[email protected]>

    monkey: Support reporting page info state
    
    Signed-off-by: Daniel Silverstone <[email protected]>

diff --git a/frontends/monkey/browser.c b/frontends/monkey/browser.c
index 26ae090..49cc63c 100644
--- a/frontends/monkey/browser.c
+++ b/frontends/monkey/browser.c
@@ -404,6 +404,48 @@ gui_window_console_log(struct gui_window *g,
              (int)msglen, msg);
 }
 
+static void
+gui_window_report_page_info(struct gui_window *g)
+{
+       const char *state = "***WAH***";
+
+       switch (browser_window_get_page_info_state(g->bw)) {
+       case PAGE_STATE_UNKNOWN:
+               state = "UNKNOWN";
+               break;
+
+       case PAGE_STATE_INTERNAL:
+               state = "INTERNAL";
+               break;
+
+       case PAGE_STATE_LOCAL:
+               state = "LOCAL";
+               break;
+
+       case PAGE_STATE_INSECURE:
+               state = "INSECURE";
+               break;
+
+       case PAGE_STATE_SECURE_OVERRIDE:
+               state = "SECURE_OVERRIDE";
+               break;
+
+       case PAGE_STATE_SECURE_ISSUES:
+               state = "SECURE_ISSUES";
+               break;
+
+       case PAGE_STATE_SECURE:
+               state = "SECURE";
+               break;
+
+       default:
+               assert(0 && "Monkey needs some lovin' here");
+               break;
+       }
+       moutf(MOUT_WINDOW, "PAGE_STATUS WIN %u STATUS %s",
+             g->win_num, state);
+}
+
 /**** Handlers ****/
 
 static void
@@ -718,6 +760,10 @@ gui_window_event(struct gui_window *gw, enum 
gui_window_event event)
                gui_window_stop_throbber(gw);
                break;
 
+       case GW_EVENT_PAGE_INFO_CHANGE:
+               gui_window_report_page_info(gw);
+               break;
+
        default:
                break;
        }


commitdiff 
http://git.netsurf-browser.org/netsurf.git/commit/?id=715586bb6548ca9281aa88abadec328272eb585f
commit 715586bb6548ca9281aa88abadec328272eb585f
Author: Daniel Silverstone <[email protected]>
Commit: Daniel Silverstone <[email protected]>

    html_saw_insecure_objects: Don't infinite loop on objects
    
    Signed-off-by: Daniel Silverstone <[email protected]>

diff --git a/content/handlers/html/html.c b/content/handlers/html/html.c
index c49697b..631045a 100644
--- a/content/handlers/html/html.c
+++ b/content/handlers/html/html.c
@@ -2680,6 +2680,7 @@ html_saw_insecure_objects(struct content *c)
                        if (content_saw_insecure_objects(obj->content))
                                return true;
                }
+               obj = obj->next;
        }
 
        /* Now check the script list */


commitdiff 
http://git.netsurf-browser.org/netsurf.git/commit/?id=33c81b69325ecd0686477916c2d0a1c590eba773
commit 33c81b69325ecd0686477916c2d0a1c590eba773
Author: Daniel Silverstone <[email protected]>
Commit: Daniel Silverstone <[email protected]>

    html_css_fetcher: Use corestring_lwc_x_ns_css
    
    Signed-off-by: Daniel Silverstone <[email protected]>

diff --git a/content/handlers/html/html_css_fetcher.c 
b/content/handlers/html/html_css_fetcher.c
index 7987ea0..71fd78f 100644
--- a/content/handlers/html/html_css_fetcher.c
+++ b/content/handlers/html/html_css_fetcher.c
@@ -31,6 +31,7 @@
 
 #include "netsurf/inttypes.h"
 #include "utils/config.h"
+#include "utils/corestrings.h"
 #include "utils/log.h"
 #include "utils/ring.h"
 #include "utils/nsurl.h"
@@ -284,7 +285,6 @@ static void html_css_fetcher_poll(lwc_string *scheme)
 /* exported interface documented in html_internal.h */
 nserror html_css_fetcher_register(void)
 {
-       lwc_string *scheme;
        const struct fetcher_operation_table html_css_fetcher_ops = {
                .initialise = html_css_fetcher_initialise,
                .acceptable = html_css_fetcher_can_fetch,
@@ -296,13 +296,7 @@ nserror html_css_fetcher_register(void)
                .finalise = html_css_fetcher_finalise
        };
 
-       if (lwc_intern_string("x-ns-css", SLEN("x-ns-css"),
-                             &scheme) != lwc_error_ok) {
-               NSLOG(netsurf, INFO, "could not intern \"x-ns-css\".");
-               return NSERROR_INIT_FAILED;
-       }
-
-       return fetcher_add(scheme, &html_css_fetcher_ops);
+       return fetcher_add(corestring_lwc_x_ns_css, &html_css_fetcher_ops);
 }
 
 /* exported interface documented in html_internal.h */


commitdiff 
http://git.netsurf-browser.org/netsurf.git/commit/?id=2e07d955b6489ac7d98708deb58adef1cb98d67a
commit 2e07d955b6489ac7d98708deb58adef1cb98d67a
Author: Daniel Silverstone <[email protected]>
Commit: Daniel Silverstone <[email protected]>

    content_saw_insecure_objects: Fix various corner cases
    
    Signed-off-by: Daniel Silverstone <[email protected]>

diff --git a/content/content.c b/content/content.c
index 1572628..a87be00 100644
--- a/content/content.c
+++ b/content/content.c
@@ -569,7 +569,8 @@ bool content_exec(struct hlcache_handle *h, const char 
*src, size_t srclen)
 bool content_saw_insecure_objects(struct hlcache_handle *h)
 {
        struct content *c = hlcache_handle_get_content(h);
-       lwc_string *scheme = nsurl_get_component(content_get_url(c), 
NSURL_SCHEME);
+       struct nsurl *url = hlcache_handle_get_url(h);
+       lwc_string *scheme = nsurl_get_component(url, NSURL_SCHEME);
        bool match;
 
        /* Is this an internal scheme? If so, we trust here and stop */
@@ -581,6 +582,14 @@ bool content_saw_insecure_objects(struct hlcache_handle *h)
             (match == true)) ||
            (lwc_string_isequal(scheme, corestring_lwc_resource,
                                &match) == lwc_error_ok &&
+            (match == true)) ||
+           /* Our internal x-ns-css scheme is secure */
+           (lwc_string_isequal(scheme, corestring_lwc_x_ns_css,
+                               &match) == lwc_error_ok &&
+            (match == true)) ||
+           /* We also treat file: as "not insecure" here */
+           (lwc_string_isequal(scheme, corestring_lwc_file,
+                               &match) == lwc_error_ok &&
             (match == true))) {
                /* No insecurity to find */
                return false;
@@ -595,13 +604,13 @@ bool content_saw_insecure_objects(struct hlcache_handle 
*h)
        }
 
        /* I am supposed to be secure, but was I overridden */
-       if (urldb_get_cert_permissions(content_get_url(c))) {
+       if (urldb_get_cert_permissions(url)) {
                /* I was https:// but I was overridden, that's no good */
                return true;
        }
 
        /* Otherwise try and chain through the handler */
-       if (c->handler->saw_insecure_objects != NULL) {
+       if (c != NULL && c->handler->saw_insecure_objects != NULL) {
                return c->handler->saw_insecure_objects(c);
        }
 


commitdiff 
http://git.netsurf-browser.org/netsurf.git/commit/?id=868c42b34493fdee2a44db68f04aa7f198afc096
commit 868c42b34493fdee2a44db68f04aa7f198afc096
Author: Daniel Silverstone <[email protected]>
Commit: Daniel Silverstone <[email protected]>

    Add x-ns-css corestring
    
    Signed-off-by: Daniel Silverstone <[email protected]>

diff --git a/utils/corestringlist.h b/utils/corestringlist.h
index b109545..8bb5b42 100644
--- a/utils/corestringlist.h
+++ b/utils/corestringlist.h
@@ -150,6 +150,7 @@ CORESTRING_LWC_VALUE(query_auth, "query/auth");
 CORESTRING_LWC_VALUE(query_ssl, "query/ssl");
 CORESTRING_LWC_VALUE(query_timeout, "query/timeout");
 CORESTRING_LWC_VALUE(query_fetcherror, "query/fetcherror");
+CORESTRING_LWC_VALUE(x_ns_css, "x-ns-css");
 
 /* mime types */
 CORESTRING_LWC_VALUE(multipart_form_data, "multipart/form-data");


-----------------------------------------------------------------------

Summary of changes:
 content/content.c                        |   15 ++++++++--
 content/handlers/html/html.c             |    1 +
 content/handlers/html/html_css_fetcher.c |   10 ++-----
 frontends/monkey/browser.c               |   46 ++++++++++++++++++++++++++++++
 utils/corestringlist.h                   |    1 +
 5 files changed, 62 insertions(+), 11 deletions(-)

diff --git a/content/content.c b/content/content.c
index 1572628..a87be00 100644
--- a/content/content.c
+++ b/content/content.c
@@ -569,7 +569,8 @@ bool content_exec(struct hlcache_handle *h, const char 
*src, size_t srclen)
 bool content_saw_insecure_objects(struct hlcache_handle *h)
 {
        struct content *c = hlcache_handle_get_content(h);
-       lwc_string *scheme = nsurl_get_component(content_get_url(c), 
NSURL_SCHEME);
+       struct nsurl *url = hlcache_handle_get_url(h);
+       lwc_string *scheme = nsurl_get_component(url, NSURL_SCHEME);
        bool match;
 
        /* Is this an internal scheme? If so, we trust here and stop */
@@ -581,6 +582,14 @@ bool content_saw_insecure_objects(struct hlcache_handle *h)
             (match == true)) ||
            (lwc_string_isequal(scheme, corestring_lwc_resource,
                                &match) == lwc_error_ok &&
+            (match == true)) ||
+           /* Our internal x-ns-css scheme is secure */
+           (lwc_string_isequal(scheme, corestring_lwc_x_ns_css,
+                               &match) == lwc_error_ok &&
+            (match == true)) ||
+           /* We also treat file: as "not insecure" here */
+           (lwc_string_isequal(scheme, corestring_lwc_file,
+                               &match) == lwc_error_ok &&
             (match == true))) {
                /* No insecurity to find */
                return false;
@@ -595,13 +604,13 @@ bool content_saw_insecure_objects(struct hlcache_handle 
*h)
        }
 
        /* I am supposed to be secure, but was I overridden */
-       if (urldb_get_cert_permissions(content_get_url(c))) {
+       if (urldb_get_cert_permissions(url)) {
                /* I was https:// but I was overridden, that's no good */
                return true;
        }
 
        /* Otherwise try and chain through the handler */
-       if (c->handler->saw_insecure_objects != NULL) {
+       if (c != NULL && c->handler->saw_insecure_objects != NULL) {
                return c->handler->saw_insecure_objects(c);
        }
 
diff --git a/content/handlers/html/html.c b/content/handlers/html/html.c
index c49697b..631045a 100644
--- a/content/handlers/html/html.c
+++ b/content/handlers/html/html.c
@@ -2680,6 +2680,7 @@ html_saw_insecure_objects(struct content *c)
                        if (content_saw_insecure_objects(obj->content))
                                return true;
                }
+               obj = obj->next;
        }
 
        /* Now check the script list */
diff --git a/content/handlers/html/html_css_fetcher.c 
b/content/handlers/html/html_css_fetcher.c
index 7987ea0..71fd78f 100644
--- a/content/handlers/html/html_css_fetcher.c
+++ b/content/handlers/html/html_css_fetcher.c
@@ -31,6 +31,7 @@
 
 #include "netsurf/inttypes.h"
 #include "utils/config.h"
+#include "utils/corestrings.h"
 #include "utils/log.h"
 #include "utils/ring.h"
 #include "utils/nsurl.h"
@@ -284,7 +285,6 @@ static void html_css_fetcher_poll(lwc_string *scheme)
 /* exported interface documented in html_internal.h */
 nserror html_css_fetcher_register(void)
 {
-       lwc_string *scheme;
        const struct fetcher_operation_table html_css_fetcher_ops = {
                .initialise = html_css_fetcher_initialise,
                .acceptable = html_css_fetcher_can_fetch,
@@ -296,13 +296,7 @@ nserror html_css_fetcher_register(void)
                .finalise = html_css_fetcher_finalise
        };
 
-       if (lwc_intern_string("x-ns-css", SLEN("x-ns-css"),
-                             &scheme) != lwc_error_ok) {
-               NSLOG(netsurf, INFO, "could not intern \"x-ns-css\".");
-               return NSERROR_INIT_FAILED;
-       }
-
-       return fetcher_add(scheme, &html_css_fetcher_ops);
+       return fetcher_add(corestring_lwc_x_ns_css, &html_css_fetcher_ops);
 }
 
 /* exported interface documented in html_internal.h */
diff --git a/frontends/monkey/browser.c b/frontends/monkey/browser.c
index 26ae090..49cc63c 100644
--- a/frontends/monkey/browser.c
+++ b/frontends/monkey/browser.c
@@ -404,6 +404,48 @@ gui_window_console_log(struct gui_window *g,
              (int)msglen, msg);
 }
 
+static void
+gui_window_report_page_info(struct gui_window *g)
+{
+       const char *state = "***WAH***";
+
+       switch (browser_window_get_page_info_state(g->bw)) {
+       case PAGE_STATE_UNKNOWN:
+               state = "UNKNOWN";
+               break;
+
+       case PAGE_STATE_INTERNAL:
+               state = "INTERNAL";
+               break;
+
+       case PAGE_STATE_LOCAL:
+               state = "LOCAL";
+               break;
+
+       case PAGE_STATE_INSECURE:
+               state = "INSECURE";
+               break;
+
+       case PAGE_STATE_SECURE_OVERRIDE:
+               state = "SECURE_OVERRIDE";
+               break;
+
+       case PAGE_STATE_SECURE_ISSUES:
+               state = "SECURE_ISSUES";
+               break;
+
+       case PAGE_STATE_SECURE:
+               state = "SECURE";
+               break;
+
+       default:
+               assert(0 && "Monkey needs some lovin' here");
+               break;
+       }
+       moutf(MOUT_WINDOW, "PAGE_STATUS WIN %u STATUS %s",
+             g->win_num, state);
+}
+
 /**** Handlers ****/
 
 static void
@@ -718,6 +760,10 @@ gui_window_event(struct gui_window *gw, enum 
gui_window_event event)
                gui_window_stop_throbber(gw);
                break;
 
+       case GW_EVENT_PAGE_INFO_CHANGE:
+               gui_window_report_page_info(gw);
+               break;
+
        default:
                break;
        }
diff --git a/utils/corestringlist.h b/utils/corestringlist.h
index b109545..8bb5b42 100644
--- a/utils/corestringlist.h
+++ b/utils/corestringlist.h
@@ -150,6 +150,7 @@ CORESTRING_LWC_VALUE(query_auth, "query/auth");
 CORESTRING_LWC_VALUE(query_ssl, "query/ssl");
 CORESTRING_LWC_VALUE(query_timeout, "query/timeout");
 CORESTRING_LWC_VALUE(query_fetcherror, "query/fetcherror");
+CORESTRING_LWC_VALUE(x_ns_css, "x-ns-css");
 
 /* mime types */
 CORESTRING_LWC_VALUE(multipart_form_data, "multipart/form-data");


-- 
NetSurf Browser

_______________________________________________
netsurf-commits mailing list
[email protected]
http://listmaster.pepperfish.net/cgi-bin/mailman/listinfo/netsurf-commits-netsurf-browser.org

Reply via email to