Commit Graph

111 Commits

Author SHA1 Message Date
John-Mark Bell d0d3d31e97 Revert "Treat cookies from HTTP and HTTPS as identical."
Sadly, this breaks path cookies on HTTPS sites. The correct
fix is to implement RFC6265 in full (probably replacing
urldb with something less complex, too).

This reverts commit 924f8844d4.
2013-01-04 22:06:31 +00:00
John-Mark Bell 924f8844d4 Treat cookies from HTTP and HTTPS as identical. 2013-01-03 00:28:51 +00:00
Daniel Silverstone 413248d0fc Rough implementation of httponly cookie support 2012-11-09 11:38:46 +00:00
Michael Drake 827d063c6b Remove special RISC OS handling of thumbnail files. (The feature has been broken for ages.) 2012-10-14 19:11:35 +01:00
Michael Drake d9e7d58106 Fix up ripples from urldb change. 2012-10-11 11:20:02 +01:00
Michael Drake e9b207c658 Port urldb to nsurl. Won't build since rest of NS needs ported to new urldb API.
+ urldb API now takes URLs as nsurl, rather than string.
+ urldb internally stores full URLs with nsurl ref.
+ urldb internally stores schemes as lwc_string.
+ Load and save of cookies and URL file may be slower since
  we now need to create a nsurl.
+ Everything else should be faster, and there should be much
  less allocating/freeing and much less parsing of the same
  url over and over again.
+ Updated urldbtest for new urldb API.
+ urldbtest now cleans up at the end
+ Added lwc_string itterator to end of urldbtest
+ Adding some broken URLs (such as http:domain/) will now
  work, since nsurl fixes (http://domain/) them.
2012-10-08 20:22:04 +01:00
Michael Drake 63adec1315 Add comment. 2012-10-05 19:06:24 +01:00
Michael Drake 0e23bbe911 Improve comment. 2012-10-05 17:29:57 +01:00
Vincent Sanders 25cdea3351 doxygen serious warning cleanup 2012-07-24 16:19:49 +01:00
Vincent Sanders 1490b52a6b NetSurf options rework (a=vince r=daniels,jmb)
svn path=/trunk/netsurf/; revision=13548
2012-03-22 09:34:34 +00:00
John Mark Bell b5acf7db9d Prevent use after free in cookie update
svn path=/trunk/netsurf/; revision=13365
2012-01-02 13:20:11 +00:00
John Mark Bell eb122c52d2 Fix cookie expiration
svn path=/trunk/netsurf/; revision=13161
2011-11-22 00:34:06 +00:00
John Mark Bell 27924aa38c Minor fix for path defaulting: retain rightmost / iff it's the first character in the path
svn path=/trunk/netsurf/; revision=11524
2011-01-29 15:17:42 +00:00
Rob Kendrick 1a7dffdac6 Brain fix on last night's IPv6 modifications
svn path=/trunk/netsurf/; revision=11000
2010-12-05 14:23:30 +00:00
Rob Kendrick ab704ba7a7 Make urldb_add_url IPv6-aware
svn path=/trunk/netsurf/; revision=10990
2010-12-04 22:46:33 +00:00
John Mark Bell 6173bb0e6c Merge treeview-redux to trunk
svn path=/trunk/netsurf/; revision=10865
2010-10-05 19:14:46 +00:00
Vincent Sanders 4b329697f7 move url database test to test directory
svn path=/trunk/netsurf/; revision=10589
2010-06-29 07:20:12 +00:00
Vincent Sanders 03bb3e8636 remove _GNU_SOURCE define from everywhere.
strndup is not standard so provide an implementation.

svn path=/trunk/netsurf/; revision=10474
2010-04-24 15:22:17 +00:00
Vincent Sanders 6990c2cd04 remove uneccissary includes
svn path=/trunk/netsurf/; revision=9931
2010-01-29 11:32:53 +00:00
John Mark Bell d591d8df94 Treat decomposed URLs with no path component as being for the path "/".
svn path=/trunk/netsurf/; revision=9703
2009-11-22 23:25:18 +00:00
John Mark Bell 8685cfb3b7 Fix the other half of this NULL dereference issue
svn path=/trunk/netsurf/; revision=9695
2009-11-22 14:21:47 +00:00
John Mark Bell 63848419e2 Ensure urldb file handle is closed on error.
svn path=/trunk/netsurf/; revision=9693
2009-11-22 14:12:03 +00:00
John Mark Bell 81c1b0e0df Don't call memcpy when p->segment is NULL
svn path=/trunk/netsurf/; revision=9687
2009-11-22 13:49:43 +00:00
John Tytgat 2261b616f6 - content/urldb.c(auth_data): Removed;
(prot_space_data): Added, it lives linked in the leaf host_part
  struct and together with its scheme and port (which defins canonical root
  url) and realm this defines a protection space.
  (path_data): Removed auth_data field and replaced by a prot_space_data
  pointer.
  (host_part::prot_space): Added linked list of protection space data
  structs.
  (urldb_get_auth_details): Given an URL fetch fetches its auth.
  (urldb_set_auth_details): Creates or updates the contents of a
  protection space to which given URL belongs.
  (urldb_destroy_host_tree): Delete protection data space structures
  using urldb_destroy_prot_space.
  (urldb_destroy_prot_space): Added.
- content/urldb.h(urldb_get_auth_details): Added realm parameter.
- content/fetchers/fetch_curl.c(fetch_curl_set_options): Update
  urldb_get_auth_details call (we don't know realm at this point).
- content/fetchcache.c(fetchcache_callback, fetchcache_auth): At FETCH_AUTH,
  use realm to determine if we really don't know auth data and if so,
  refetch content.
- content/content.h(struct content): Add content::tried_with_auth.
- content/content.c(content_create): Initialize content::tried_with_auth.
- riscos/401login.c(ro_gui_401login_open): Show known authentication
  data in dialogue so user can see what was wrong with it and correct it.

Solves bug #2830829.

svn path=/trunk/netsurf/; revision=9045
2009-08-04 23:02:23 +00:00
John Tytgat 9d678ef7cd Drop pkg-config on cairo, not needed here. Added const.
svn path=/trunk/netsurf/; revision=8985
2009-08-02 12:07:29 +00:00
John Mark Bell ceca548a1d Fix serialisation of page titles.
svn path=/trunk/netsurf/; revision=8313
2009-07-04 18:19:29 +00:00
John Mark Bell c1e3fb0bec Remove spurious "domain" variable from urldb_iterate_partial().
Lose unnecessary increment of rptr in cookie domain prefix matching.
Record that, in the long term, we need some kind of TLD service to consult so that (e.g.) .co.uk is not considered a valid domain prefix.

svn path=/trunk/netsurf/; revision=7600
2009-05-28 13:19:07 +00:00
John Mark Bell 53bbe5fb9e Fix url completion when last character in url bar is a /
svn path=/trunk/netsurf/; revision=7105
2009-04-16 14:12:54 +00:00
John Mark Bell 79c0981402 Ensure that neither the current fetch host nor the referrer is an IP address before attempting to domain match them.
svn path=/trunk/netsurf/; revision=6466
2009-02-13 10:49:35 +00:00
John Mark Bell e5c225f7d9 Even fuzzier domain matching.
svn path=/trunk/netsurf/; revision=6463
2009-02-13 00:25:48 +00:00
John Mark Bell 19321017a9 Document the assumption that all URLs passed into urldb are already normalised. Violate this precondition at your peril.
svn path=/trunk/netsurf/; revision=6371
2009-02-06 02:08:00 +00:00
John Mark Bell 6a0a7c346a Let's try that again. Now actually passes the regression tests.
svn path=/trunk/netsurf/; revision=6317
2009-01-31 03:03:50 +00:00
John Mark Bell e2ebfb72f7 Fix urldb_match_path().
Fix test code.

svn path=/trunk/netsurf/; revision=6316
2009-01-31 02:49:26 +00:00
John Mark Bell 966b402881 urldb_destroy_path_tree() -> iteration
svn path=/trunk/netsurf/; revision=6315
2009-01-31 02:30:28 +00:00
John Mark Bell 9085c458d3 urldb_save_cookie_paths() -> iteration
svn path=/trunk/netsurf/; revision=6314
2009-01-31 02:16:01 +00:00
John Mark Bell 71e397eb84 Initialising variables helps
svn path=/trunk/netsurf/; revision=6313
2009-01-31 02:13:12 +00:00
John Mark Bell 92b3bdeda0 urldb_delete_cookie_paths() -> iteration
svn path=/trunk/netsurf/; revision=6312
2009-01-31 02:12:06 +00:00
John Mark Bell 45b222ab50 Make urldb_dump_paths iterate
svn path=/trunk/netsurf/; revision=6311
2009-01-31 02:02:01 +00:00
John Mark Bell a1d409d922 Make urldb_match_path() iterate.
svn path=/trunk/netsurf/; revision=6310
2009-01-31 01:57:15 +00:00
John Mark Bell 376ef0ca47 Make urldb_iterate_entries_path use iteration
svn path=/trunk/netsurf/; revision=6304
2009-01-30 19:58:46 +00:00
John Mark Bell e5c07a3a82 Pedantic linewrapping
svn path=/trunk/netsurf/; revision=6303
2009-01-30 19:47:15 +00:00
John Mark Bell 29fac74dcc Make urldb_iterate_partial_path iterate over the tree and not recurse.
svn path=/trunk/netsurf/; revision=6302
2009-01-30 19:43:54 +00:00
John Mark Bell ffe288e50b This logic looked entirely wrong. Fix it to be more sane. If this breaks things, blame the lack of commentary.
svn path=/trunk/netsurf/; revision=6301
2009-01-30 19:09:26 +00:00
John Mark Bell a2fbddea60 Minor optimisation
svn path=/trunk/netsurf/; revision=6300
2009-01-30 18:50:55 +00:00
John Mark Bell a3f46b12ef Iterate when counting/writing out paths.
svn path=/trunk/netsurf/; revision=6299
2009-01-30 18:48:55 +00:00
John Mark Bell 79fdbab192 Jump through hoops, potentially squashing warnings.
svn path=/trunk/netsurf/; revision=5569
2008-10-13 23:45:08 +00:00
Daniel Silverstone eaa744c0d2 Remove urldb_search_remove. Added hint for where to find it if we need it in future
svn path=/trunk/netsurf/; revision=5531
2008-10-10 11:54:37 +00:00
François Revel f28f4cc760 First round of C89 fixes. Those should be obvious, hope I didn't introduce any side effect.
svn path=/trunk/netsurf/; revision=4788
2008-07-29 09:05:36 +00:00
James Bursa f87138e5de Remove two unused functions.
svn path=/trunk/netsurf/; revision=4333
2008-06-14 23:17:50 +00:00
Rob Kendrick 59641def82 const fixes in plotters and history core
svn path=/trunk/netsurf/; revision=4083
2008-04-07 11:15:09 +00:00