Gitweb links:
...log
http://git.netsurf-browser.org/netsurf.git/shortlog/dd43748676ff80357e231fec7182b1969584f9a4
...commit
http://git.netsurf-browser.org/netsurf.git/commit/dd43748676ff80357e231fec7182b1969584f9a4
...tree
http://git.netsurf-browser.org/netsurf.git/tree/dd43748676ff80357e231fec7182b1969584f9a4
The branch, master has been updated
via dd43748676ff80357e231fec7182b1969584f9a4 (commit)
from a912d4db4ea87adbd7f27fa162068b235f8053a0 (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=dd43748676ff80357e231fec7182b1969584f9a4
commit dd43748676ff80357e231fec7182b1969584f9a4
Author: Daniel Silverstone <[email protected]>
Commit: Daniel Silverstone <[email protected]>
fix: Make it OK if the chain isn't avilable during bad-ssl querying
Signed-off-by: Daniel Silverstone <[email protected]>
diff --git a/content/fetchers/about.c b/content/fetchers/about.c
index 532223f..6bb71a9 100644
--- a/content/fetchers/about.c
+++ b/content/fetchers/about.c
@@ -2199,7 +2199,7 @@ static bool fetch_about_query_privacy_handler(struct
fetch_about_context *ctx)
const char *title;
struct nsurl *siteurl = NULL;
char *description = NULL;
- const char *chainurl = "";
+ const char *chainurl = NULL;
const struct fetch_multipart_data *curmd; /* mutipart data iterator */
/* extract parameters from multipart post data */
@@ -2261,16 +2261,24 @@ static bool fetch_about_query_privacy_handler(struct
fetch_about_context *ctx)
goto fetch_about_query_ssl_handler_aborted;
}
}
- res = ssenddataf(ctx,
- "<div><p>%s</p></div>"
- "<div><p><a href=\"%s\"
target=\"_blank\">%s</a></p></div>",
- reason,
- chainurl,
- messages_get("ViewCertificates"));
+
+ if (chainurl == NULL) {
+ res = ssenddataf(ctx,
+ "<div><p>%s</p></div>"
+ "<div><p>%s</p></div>",
+ reason,
+ messages_get("ViewCertificatesNotPossible"));
+ } else {
+ res = ssenddataf(ctx,
+ "<div><p>%s</p></div>"
+ "<div><p><a href=\"%s\"
target=\"_blank\">%s</a></p></div>",
+ reason,
+ chainurl,
+ messages_get("ViewCertificates"));
+ }
if (res != NSERROR_OK) {
goto fetch_about_query_ssl_handler_aborted;
}
-
res = ssenddataf(ctx,
"<div id=\"buttons\">"
"<input type=\"submit\" id=\"back\" name=\"back\" "
diff --git a/desktop/browser_window.c b/desktop/browser_window.c
index 2dcd079..74d79ea 100644
--- a/desktop/browser_window.c
+++ b/desktop/browser_window.c
@@ -1149,25 +1149,23 @@ browser_window__handle_bad_certs(struct browser_window
*bw,
break;
}
}
- }
- err = fetch_multipart_data_new_kv(¶ms.post_multipart,
- "reason",
- reason);
- if (err != NSERROR_OK) {
- goto out;
- }
-
- err = cert_chain_to_query(bw->loading_cert_chain, &chainurl);
+ err = cert_chain_to_query(bw->loading_cert_chain, &chainurl);
+ if (err != NSERROR_OK) {
+ goto out;
+ }
- if (err != NSERROR_OK) {
- goto out;
+ err = fetch_multipart_data_new_kv(¶ms.post_multipart,
+ "chainurl",
+ nsurl_access(chainurl));
+ if (err != NSERROR_OK) {
+ goto out;
+ }
}
err = fetch_multipart_data_new_kv(¶ms.post_multipart,
- "chainurl",
- nsurl_access(chainurl));
-
+ "reason",
+ reason);
if (err != NSERROR_OK) {
goto out;
}
diff --git a/resources/FatMessages b/resources/FatMessages
index 4b0b840..9b15485 100644
--- a/resources/FatMessages
+++ b/resources/FatMessages
@@ -1083,6 +1083,11 @@ de.all.ViewCertificates:Zertifikatdetails anzeigen
fr.all.ViewCertificates:Afficher les détails du certificat
it.all.ViewCertificates:Visualizza i dettagli del certificato
nl.all.ViewCertificates:Bekijk certificaatdetails
+en.all.ViewCertificatesNotPossible:Certificate information is not available
for viewing
+de.all.ViewCertificatesNotPossible:Zertifikatinformationen können nicht
angezeigt werden
+fr.all.ViewCertificatesNotPossible:Les informations du certificat ne sont pas
disponibles pour la visualisation
+it.all.ViewCertificatesNotPossible:Le informazioni sul certificato non sono
disponibili per la visualizzazione
+nl.all.ViewCertificatesNotPossible:Certificaatinformatie is niet beschikbaar
voor weergave
en.all.Proceed:Proceed
de.all.Proceed:Vorgehen
fr.all.Proceed:Procéder
-----------------------------------------------------------------------
Summary of changes:
content/fetchers/about.c | 24 ++++++++++++++++--------
desktop/browser_window.c | 26 ++++++++++++--------------
resources/FatMessages | 5 +++++
3 files changed, 33 insertions(+), 22 deletions(-)
diff --git a/content/fetchers/about.c b/content/fetchers/about.c
index 532223f..6bb71a9 100644
--- a/content/fetchers/about.c
+++ b/content/fetchers/about.c
@@ -2199,7 +2199,7 @@ static bool fetch_about_query_privacy_handler(struct
fetch_about_context *ctx)
const char *title;
struct nsurl *siteurl = NULL;
char *description = NULL;
- const char *chainurl = "";
+ const char *chainurl = NULL;
const struct fetch_multipart_data *curmd; /* mutipart data iterator */
/* extract parameters from multipart post data */
@@ -2261,16 +2261,24 @@ static bool fetch_about_query_privacy_handler(struct
fetch_about_context *ctx)
goto fetch_about_query_ssl_handler_aborted;
}
}
- res = ssenddataf(ctx,
- "<div><p>%s</p></div>"
- "<div><p><a href=\"%s\"
target=\"_blank\">%s</a></p></div>",
- reason,
- chainurl,
- messages_get("ViewCertificates"));
+
+ if (chainurl == NULL) {
+ res = ssenddataf(ctx,
+ "<div><p>%s</p></div>"
+ "<div><p>%s</p></div>",
+ reason,
+ messages_get("ViewCertificatesNotPossible"));
+ } else {
+ res = ssenddataf(ctx,
+ "<div><p>%s</p></div>"
+ "<div><p><a href=\"%s\"
target=\"_blank\">%s</a></p></div>",
+ reason,
+ chainurl,
+ messages_get("ViewCertificates"));
+ }
if (res != NSERROR_OK) {
goto fetch_about_query_ssl_handler_aborted;
}
-
res = ssenddataf(ctx,
"<div id=\"buttons\">"
"<input type=\"submit\" id=\"back\" name=\"back\" "
diff --git a/desktop/browser_window.c b/desktop/browser_window.c
index 2dcd079..74d79ea 100644
--- a/desktop/browser_window.c
+++ b/desktop/browser_window.c
@@ -1149,25 +1149,23 @@ browser_window__handle_bad_certs(struct browser_window
*bw,
break;
}
}
- }
- err = fetch_multipart_data_new_kv(¶ms.post_multipart,
- "reason",
- reason);
- if (err != NSERROR_OK) {
- goto out;
- }
-
- err = cert_chain_to_query(bw->loading_cert_chain, &chainurl);
+ err = cert_chain_to_query(bw->loading_cert_chain, &chainurl);
+ if (err != NSERROR_OK) {
+ goto out;
+ }
- if (err != NSERROR_OK) {
- goto out;
+ err = fetch_multipart_data_new_kv(¶ms.post_multipart,
+ "chainurl",
+ nsurl_access(chainurl));
+ if (err != NSERROR_OK) {
+ goto out;
+ }
}
err = fetch_multipart_data_new_kv(¶ms.post_multipart,
- "chainurl",
- nsurl_access(chainurl));
-
+ "reason",
+ reason);
if (err != NSERROR_OK) {
goto out;
}
diff --git a/resources/FatMessages b/resources/FatMessages
index 4b0b840..9b15485 100644
--- a/resources/FatMessages
+++ b/resources/FatMessages
@@ -1083,6 +1083,11 @@ de.all.ViewCertificates:Zertifikatdetails anzeigen
fr.all.ViewCertificates:Afficher les détails du certificat
it.all.ViewCertificates:Visualizza i dettagli del certificato
nl.all.ViewCertificates:Bekijk certificaatdetails
+en.all.ViewCertificatesNotPossible:Certificate information is not available
for viewing
+de.all.ViewCertificatesNotPossible:Zertifikatinformationen können nicht
angezeigt werden
+fr.all.ViewCertificatesNotPossible:Les informations du certificat ne sont pas
disponibles pour la visualisation
+it.all.ViewCertificatesNotPossible:Le informazioni sul certificato non sono
disponibili per la visualizzazione
+nl.all.ViewCertificatesNotPossible:Certificaatinformatie is niet beschikbaar
voor weergave
en.all.Proceed:Proceed
de.all.Proceed:Vorgehen
fr.all.Proceed:Procéder
--
NetSurf Browser
_______________________________________________
netsurf-commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]