summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSebastian Geerken <devnull@localhost>2015-01-02 00:39:21 +0100
committerSebastian Geerken <devnull@localhost>2015-01-02 00:39:21 +0100
commit974f88a4adc3ef460ad00ba3d398f697c8812393 (patch)
tree55c88aad376ae3d6a0a2f714c9f55673d9d989ef /src
parentecb8be82abafc3c7580cdeed4c8902b44bd06ae5 (diff)
parent86e780e73a11e8b9d1d57cb5f283c4fee6ca68e8 (diff)
Merge with main repo.
Diffstat (limited to 'src')
-rw-r--r--src/IO/about.c70
-rw-r--r--src/cache.c12
-rw-r--r--src/dillo.cc4
-rw-r--r--src/html.cc6
-rw-r--r--src/jpeg.c3
-rw-r--r--src/prefs.c3
-rw-r--r--src/uicmd.cc6
7 files changed, 35 insertions, 69 deletions
diff --git a/src/IO/about.c b/src/IO/about.c
index 5c3ca973..0cc3b427 100644
--- a/src/IO/about.c
+++ b/src/IO/about.c
@@ -266,70 +266,28 @@ const char *const AboutSplash=
"<tr>\n"
" <td bgcolor='#CCCCCC'>\n"
" <h4>Release overview</h4>\n"
-" April 09, 2014\n"
+" December 24, 2014\n"
"<tr>\n"
" <td bgcolor='#FFFFFF'>\n"
" <table border='0' cellspacing='0' cellpadding='5'>\n"
" <tr>\n"
" <td>\n"
"<p>\n"
-"dillo-3.0.4 adds some nice new features, as listed below.\n"
-"<p>\n"
-"This release comes with better <b>text rendering</b> in the form of\n"
-"some linebreaking fixes, and optimization for non-justified text,\n"
-"including a new preference stretchability_factor.\n"
-"<p>\n"
-"It also comes with support for a few <b>HTML5</b> elements and better CSS\n"
-"including background <b>images</b> (enable load_background_images in\n"
-"dillorc or the tools menu).\n"
-"<p>\n"
-"It has enhanced <b>security</b> by fixing a set of potentially exploitable\n"
-"code patterns reported by the Oulu University Secure Programming Group.\n"
-"<p>\n"
-"Finally it also fixes compiling on HURD and IRIX.\n"
-"<p>\n"
-"The core team welcomes developers willing to join our workforce.\n"
-"<p>\n"
-" </table>\n"
-"</table>\n"
-"</table>\n"
-"\n"
-"<br>\n"
-"\n"
-"<table border='0' cellpadding='0' cellspacing='0' align='center' bgcolor='#000000' width='100%'><tr><td>\n"
-"<table border='0' cellpadding='5' cellspacing='1' width='100%'>\n"
-"<tr>\n"
-" <td bgcolor='#CCCCCC'>\n"
-" <h4>ChangeLog highlights</h4>\n"
-" (Extracted from the\n"
-" <a href='http://hg.dillo.org/dillo/raw-file/tip/ChangeLog'>full\n"
-" ChangeLog</a>)\n"
-"<tr>\n"
-" <td bgcolor='#FFFFFF'>\n"
-" <table border='0' cellspacing='0' cellpadding='5'>\n"
-" <tr>\n"
-" <td>\n"
+"The dillo-3.0.4.1 release brings you fixes:\n"
"<ul>\n"
-"<li> OPTGROUP and INS elements.\n"
-"<li> Added some HTML5 elements.\n"
-"<li> Added <b>show_ui_tooltip</b> preference (BUG#1140).\n"
-"<li> Make embedding into other applications more reliable (BUG#1127).\n"
-"<li> Add search from address bar.\n"
-"<li> Better scaling (down) of images, even with consideration of gamma \n"
-" correction.\n"
-"<li> Some linebreaking fixes, and optimization for non-justified text,\n"
-" including new preference <b>stretchability_factor</b>.\n"
-"<li> Added <b>white_bg_replacement</b> preference.\n"
-"<li> Implemented background images (except 'background-attachment'), added\n"
-" <b>load_background_images</b> preference, as well as a new entry in the\n"
-" tools menu.\n"
-"<li> Fix a set of bugs reported by Oulu Univ. Secure Programming Group\n"
-" (HTML parsing, URL resolution, GIF processing, etc.)\n"
-"<li> Made <b>show_url</b> dillorc option work again (BUG#1128)\n"
-"<li> Fix compiling on Hurd.\n"
-"<li> Avoid Dpid children becoming zombies.\n"
-"<li> Fix compiling on IRIX with MIPSpro compiler.\n"
+"<li> for linking with the recently-released fltk-1.3.3\n"
+" (we don't use <tt>fl_oldfocus</tt> anymore).\n"
+"<li> to make sure that windows are resizable with fltk-1.3.3.\n"
+"<li> not to load background images, or follow redirections or meta refresh,\n"
+" in <tt>--local</tt> mode (security).\n"
+"<li> to permit linking on OS X (remove our <tt>Fl_Printer</tt> stub).\n"
+"<li> for a crash when searching from the address bar and no search urls are\n"
+" found in dillorc.\n"
"</ul>\n"
+"<p>\n"
+"...that shouldn't have to wait until dillo-3.1 is ready with its floating\n"
+"elements and assorted good things.\n"
+"<p>\n"
" </table>\n"
"</table>\n"
"</table>\n"
diff --git a/src/cache.c b/src/cache.c
index ee424c58..189e18d5 100644
--- a/src/cache.c
+++ b/src/cache.c
@@ -1001,14 +1001,20 @@ static int Cache_redirect(CacheEntry_t *entry, int Flags, BrowserWindow *bw)
_MSG(" Cache_redirect: redirect_level = %d\n", bw->redirect_level);
+ /* Don't allow redirection for SpamSafe/local URLs */
+ if (URL_FLAGS(entry->Url) & URL_SpamSafe) {
+ a_UIcmd_set_msg(bw, "WARNING: local URL with redirection. Aborting.");
+ return 0;
+ }
+
/* if there's a redirect loop, stop now */
if (bw->redirect_level >= 5)
entry->Flags |= CA_RedirectLoop;
if (entry->Flags & CA_RedirectLoop) {
- a_UIcmd_set_msg(bw, "ERROR: redirect loop for: %s", URL_STR_(entry->Url));
- bw->redirect_level = 0;
- return 0;
+ a_UIcmd_set_msg(bw, "ERROR: redirect loop for: %s", URL_STR_(entry->Url));
+ bw->redirect_level = 0;
+ return 0;
}
if ((entry->Flags & CA_Redirect && entry->Location) &&
diff --git a/src/dillo.cc b/src/dillo.cc
index f4925dd2..0e49e7b5 100644
--- a/src/dillo.cc
+++ b/src/dillo.cc
@@ -92,8 +92,8 @@ static const CLI_options Options[] = {
{"-h", "--help", 0, DILLO_CLI_HELP,
" -h, --help Display this help text and exit."},
{"-l", "--local", 0, DILLO_CLI_LOCAL,
- " -l, --local Don't load images or stylesheets for these "
- "URL(s)."},
+ " -l, --local Don't load images or stylesheets, or follow\n"
+ " redirections, for these FILEs or URLs."},
{"-v", "--version", 0, DILLO_CLI_VERSION,
" -v, --version Display version info and exit."},
{"-x", "--xid", 1, DILLO_CLI_XID,
diff --git a/src/html.cc b/src/html.cc
index c17db53a..be4d3526 100644
--- a/src/html.cc
+++ b/src/html.cc
@@ -3202,8 +3202,12 @@ static void Html_tag_open_meta(DilloHtml *html, const char *tag, int tagsize)
} else if (delay == 0) {
/* zero-delay redirection */
html->stop_parser = true;
- if (a_Capi_dpi_verify_request(html->bw, new_url))
+ if (URL_FLAGS(html->base_url) & URL_SpamSafe) {
+ a_UIcmd_set_msg(html->bw,
+ "WARNING: local URL with META refresh. Aborting.");
+ } else if (a_Capi_dpi_verify_request(html->bw, new_url)) {
a_UIcmd_redirection0((void*)html->bw, new_url);
+ }
} else {
/* Send a custom HTML message.
* TODO: This is a hairy hack,
diff --git a/src/jpeg.c b/src/jpeg.c
index 5652aa56..c6ee472c 100644
--- a/src/jpeg.c
+++ b/src/jpeg.c
@@ -273,9 +273,8 @@ static void Jpeg_write(DilloJpeg *jpeg, void *Buf, uint_t BufSize)
} else if (jpeg->cinfo.num_components == 3) {
type = DILLO_IMG_TYPE_RGB;
} else {
- MSG("4-component JPEG!\n");
if (jpeg->cinfo.jpeg_color_space == JCS_YCCK)
- MSG("YCCK. Are the colors wrong?\n");
+ MSG("YCCK JPEG. Are the colors wrong?\n");
if (!jpeg->cinfo.saw_Adobe_marker)
MSG("No adobe marker! Is the image shown in reverse video?\n");
type = DILLO_IMG_TYPE_CMYK_INV;
diff --git a/src/prefs.c b/src/prefs.c
index 67cbaa79..abcbfcd0 100644
--- a/src/prefs.c
+++ b/src/prefs.c
@@ -18,7 +18,7 @@
#define PREFS_FONT_CURSIVE "URW Chancery L"
#define PREFS_FONT_FANTASY "DejaVu Sans" /* TODO: find good default */
#define PREFS_FONT_MONOSPACE "DejaVu Sans Mono"
-#define PREFS_SEARCH_URL "http://duckduckgo.com/lite/?kp=-1&q=%s"
+#define PREFS_SEARCH_URL "dd http://duckduckgo.com/lite/?kp=-1&q=%s"
#define PREFS_NO_PROXY "localhost 127.0.0.1"
#define PREFS_SAVE_DIR "/tmp/"
#define PREFS_HTTP_REFERER "host"
@@ -82,7 +82,6 @@ void a_Prefs_init(void)
prefs.save_dir = dStrdup(PREFS_SAVE_DIR);
prefs.search_urls = dList_new(16);
dList_append(prefs.search_urls, dStrdup(PREFS_SEARCH_URL));
- dList_append(prefs.search_urls, NULL); /* flags a default search URL */
prefs.search_url_idx = 0;
prefs.show_back = TRUE;
prefs.show_bookmarks = TRUE;
diff --git a/src/uicmd.cc b/src/uicmd.cc
index c849a130..5225be75 100644
--- a/src/uicmd.cc
+++ b/src/uicmd.cc
@@ -552,10 +552,10 @@ BrowserWindow *a_UIcmd_browser_window_new(int ww, int wh,
win->box(FL_NO_BOX);
CustTabs *DilloTabs = new CustTabs(ww, wh, 16);
win->end();
+ win->resizable(DilloTabs->wizard());
int focus = 1;
new_bw = UIcmd_tab_new(DilloTabs, old_ui, focus);
- win->resizable(DilloTabs->wizard());
win->show();
if (old_bw == NULL && prefs.xpos >= 0 && prefs.ypos >= 0) {
@@ -682,7 +682,7 @@ static char *UIcmd_find_search_str(const char *str)
for (p = 0; p < dList_length(prefs.search_urls); p++) {
const char *search =
(const char *)dList_nth_data(prefs.search_urls, p);
- if (strncasecmp(str, search, len) == 0) {
+ if (search && strncasecmp(str, search, len) == 0) {
prefs.search_url_idx = p;
url = UIcmd_make_search_str(str + len + 1);
break;
@@ -933,7 +933,7 @@ static int UIcmd_save_file_check(const char *name)
int ch;
ds = dStr_sized_new(128);
dStr_sprintf(ds,
- "The file:\n %s (%d Bytes)\nalready exists. What do we do?",
+ "The file:\n %s (%d Bytes)\nalready exists. What do we do?",
name, (int)ss.st_size);
ch = a_Dialog_choice("Dillo Save: File exists!", ds->str,
"Abort", "Continue", "Rename", NULL);