1
0
mirror of https://github.com/webrecorder/pywb.git synced 2025-03-28 08:32:29 +01:00

242 Commits

Author SHA1 Message Date
Ilya Kreymer
6452c72b4f bump versions 2016-09-08 10:31:07 -07:00
Ilya Kreymer
1fe201c528 rewrite: html: rewrite svg <image> tag
client: update textContent after rewrite_style() in rewrite_elem()
2016-09-08 10:06:47 -07:00
Ilya Kreymer
895a01933c wb: allow multiple readystateevent changes, in case data changes (eg. title is available later) 2016-09-02 12:04:30 -07:00
Ilya Kreymer
70a25b6d0f client rewrite: ensure window.open() windows have wombat inited. if they are set to about:blank, use parser from opener to ensure proper relative url resolving 2016-08-20 13:03:17 -04:00
Ilya Kreymer
099a81b786 wb_frame: add support for optional 'wbinfo.outer_prefix' which if set, is used for making the top frame url (#191) 2016-08-20 00:03:21 -04:00
Ilya Kreymer
892ebacead cross-frame improvements: #191
- make hashchange functions use postMessage(), support setting top->replay and replay->top
- special postMessage() option for sending message from top frame -> replay frame
- fix history navigation, mimic top frame history same as replay frame as much as possible
- remove iframe_loaded() callback, using postMessage() notifications only
- include document title in 'load' message
2016-08-19 23:44:15 -04:00
Ilya Kreymer
6af1a7856e top-frame handling: don't access contents of top frame directly to support cross-domain frames
set __WB_top_Frame in wombat if is_framed property is true, don't check wbinfo (#191)
2016-08-19 13:59:42 -04:00
Ilya Kreymer
b22a29df5f vidrw: also check for 'src' param as well as movie 2016-08-08 19:50:16 -04:00
Ilya Kreymer
d5adc05cbb history rewrite check: don't check empty urls (#188) 2016-08-01 10:27:38 -04:00
Ilya Kreymer
c3389987cd frame timestamp extract: fix timestamp extracting timestamp for non-html resources for use with frame display (#189) 2016-07-28 10:06:10 -04:00
Ilya Kreymer
42a2fa02fe wombat: history check fix: ensure check applies to absolute url #188 2016-07-16 13:32:46 -04:00
Ilya Kreymer
64a49b3e4d wombat: history change improvements (#188):
- ensure back, go, forward also propagated to top frame
- ensure pushState propagated as pushState and replaceState as replaceState to top frame
- security: prevent pushState or replaceState from changing to different domain
2016-07-16 13:18:08 -04:00
Ilya Kreymer
0b57f4a352 cookie notification: use postMessage() instead of callback to notify top frame of cookie setting with custom domain, #186 2016-07-01 09:58:25 -04:00
Ilya Kreymer
827ba9b50f cookies: add optional callback when setting cookie with domain (to experiment with server side handling of custom domain) 2016-06-30 12:26:18 -04:00
Ilya Kreymer
e28f294302 wombat: ensure window.open() rewrite happens even in if open not in prototype
rewrite mod: allow empty "" as set mod, check for undefined
2016-05-24 17:55:17 -07:00
Ilya Kreymer
84c829467b framed replay: use postMessage() instead of custom function to notify of replay frame changing url, include different type of change, eg. load, replaceState, pushState, #181 2016-05-23 12:10:10 -07:00
Ilya Kreymer
94afab0bb2 wombat rewrite: don't add duplicate slash in rel-url resolve 2016-05-17 18:53:00 -07:00
Ilya Kreymer
e5e7c5a7df wombat: ensure Math.random() overrides use the current window 2016-05-06 09:48:38 -07:00
Ilya Kreymer
033909efe0 wombat: set version to 1.12
return 'null' for frameElement ovevrride instead of undefined
2016-05-01 11:46:36 -07:00
Ilya Kreymer
1c97a67763 rewrite client-side improvements:
add WB_wombat_frameElement Object prototype property to support frameElement rewriting
document.domain: allow changing to higher-level domain
rewrite_elem: also rewrite <form> action and <input> value, if they are absolute urls
2016-04-30 01:43:40 -07:00
Ilya Kreymer
61381fcac6 wombat rewrite: remove cookie domain if hostname is an IP address 2016-04-07 15:53:26 -07:00
Ilya Kreymer
95a212ed79 wombat rewrite: add custom X-Pywb-Requested-With header with turns off rewriting and is never sent upstream 2016-04-06 12:05:53 -07:00
Ilya Kreymer
63f44cbc26 wombat: bump version to 2.11 2016-03-20 22:54:27 -07:00
Ilya Kreymer
4b8bbb7b40 wombat: fix typo in window.Crypto check! 2016-03-20 22:51:39 -07:00
Ilya Kreymer
d2390ee809 wombat: add check for window.crypto, generate 32-bit values 2016-03-20 22:43:05 -07:00
Ilya Kreymer
08cb02c644 wombat: override window.crypto.getRandomValues() with seeded random 2016-03-20 18:50:45 -07:00
Ilya Kreymer
c76aa17b78 wb.js: pad timestamp to 14 digits 2016-02-25 18:25:28 -08:00
Ilya Kreymer
98843a2551 wombat: call reload() on actual location, possible fix related to #164 2015-12-29 16:17:39 -08:00
Ilya Kreymer
0cf6b40af9 wombat: add option to def_prop() to make overriden property enumerable, make WombatLocation and other loc overrides enumerable, fixes #163 2015-12-18 21:46:50 -08:00
Ilya Kreymer
79b35a64b3 bump wombat version to 2.10 2015-12-13 00:31:01 -08:00
Ilya Kreymer
64fe49d703 wombat: add CSSStyleSheet.prototype href override
karma tests: change name to just 'pywb'
2015-12-11 17:33:22 -08:00
Robert Knight
34721a6742 Override HTMLAnchorElement.prototype.toString()
The values returned by getting the 'href' and 'toString'
properties of an anchor element should be the same.

This inconsistency broke the URL polyfill in
https://github.com/inexorabletash/polyfill under Microsoft Edge
2015-12-02 20:09:09 +00:00
Robert Knight
977647cea9 Override the baseURI property on the correct object
baseURI is a property of Node.prototype
in current browsers and should be overridden there,
except for Safari where it cannot be overridden at all.
2015-11-26 17:09:26 +00:00
Robert Knight
1484b06da6 Avoid changing the writability of the 'href' attr of <base>
Wombat overrides document.baseURI and <base>.href in order
to return the original URL rather than the proxied URL.

The <base>.href override however ended up making a writable
attribute read-only, which could trigger script errors
in strict-mode JS.

Fix this by avoiding replacing the setter for a DOM property
if no replacement setter is provided.

Fixes an error loading Hypothesis under Microsoft Edge.
2015-11-26 13:54:47 +00:00
Robert Knight
f2fdbcc511 Lookup baseURI getter on Node.prototype, not Node
Fix regression in baseURI override, spotted by the Karma
tests.

The getter should be looked up on Node.prototype, not Node.
2015-11-26 10:00:09 +00:00
Ilya Kreymer
cd2390333a Merge pull request #153 from robertknight/safari-dom-fixes
Fix Wombat in Safari 9
2015-11-26 01:15:30 -08:00
Robert Knight
5208117299 Fix Wombat in Safari 9
In Safari 9, Object.getOwnPropertyDescriptor(domObject.prototype, prop)
returns descriptors which have the correct structure but undefined
getters and are marked as unconfigurable.

See https://bugs.webkit.org/show_bug.cgi?id=49739#c19
for details. The getters cannot be retrieved via obj.__lookupGetter__()
either.

 * Resolve the issue by skipping overrides for DOM properties
   where the property is not configurable, or the original getter for
   a property could not be retrieved.

 * Lookup the 'baseURI' property on the correct prototype (Node,
   not document)

This fix also resolves the problem where accesses to document.baseURI
on Edge would fail.
2015-11-25 16:52:11 +00:00
Ilya Kreymer
dc74b14af0 iframe scrolling: use webkit scrollbars for better scrolling iframes due to osx chrome iframe bug
scrollbar now fully functional, though some artifacts still appear #93
2015-10-31 12:06:01 -07:00
Ilya Kreymer
f3c87c1786 wombat: additional checks for cross-frame top frame access, #137 2015-10-21 10:54:48 -07:00
Ilya Kreymer
8b68119994 wombat: use wb_rel_prefix instead of wbinfo.coll for rel prefix path 2015-10-17 08:53:01 -07:00
Ilya Kreymer
42091fd36e wombat: fix typo which caused rewrite_style() to be skipped unless style started with url prefix! 2015-10-14 17:36:33 -07:00
Ilya Kreymer
edbfd500a4 wombat: fix rel '/' rewrite which incorrectly handles rel scheme '//' urls 2015-10-12 22:13:26 -07:00
Ilya Kreymer
8b7516708d wombat: improved rewrite when running at root: fixes for extract_orig and /-rel rewrite
move init to be before proxy check
2015-10-11 23:16:15 -07:00
Ilya Kreymer
4dfe187174 proxy improvements:
use proxy_magic path to get video info to ensure video info, addresses #106
video info: ensure vi_ replay has CORS support to support serving from magic path
proxy & wombat improvements: set replay_top to window.top and avoid causing cross-domain errors
2015-10-11 21:03:30 -07:00
Ilya Kreymer
9a19265786 rewrite: disable 'integrity' (as well as crossorigin) attr due to rewriting, which modifies the resource 2015-10-05 23:04:56 -07:00
Ilya Kreymer
46a8cb5132 wombat: fix typo! 2015-10-02 12:22:42 -07:00
Ilya Kreymer
3d7a3fb9ef wombat: fix change test bool logic typos 2015-09-24 21:33:13 -07:00
Ilya Kreymer
87d7fb11ca wombat improvements:
* detect if anything actually rewritten in rewrite_html(), skip write()/writeln() override if no changes
* for relative ./ or ../ rewrite, find trailing slash
* better window detection instead of instanceof Window (using constructor and window prop check)
* bump to wombat 2.9
2015-09-24 21:10:06 -07:00
Ilya Kreymer
a45464cc61 wombat: fix form action overrides 2015-09-20 11:49:04 -07:00
Ilya Kreymer
589eb6513c wombat: related to #129, resolve any dynamic urls with a "." or ".." relative to original url, avoiding break rewrite url 2015-09-14 19:23:44 -07:00