62 Commits

Author SHA1 Message Date
alex
5233db62d8 Dockerfile : Various modifications
- the key is base64 encoded /!\ break compatibility, see searx project PR #1629
- make sure to use golang:1.12-alpine to build morty to support TLS 1.3 (from morty to external)

git-svn-id: file:///srv/svn/repo/yukari/trunk@92 f3bd38d9-da89-464d-a02a-eb04e43141b5
2019-07-02 16:20:01 +00:00
ave
206e8ce20e Add support for image/x-icon
git-svn-id: file:///srv/svn/repo/yukari/trunk@88 f3bd38d9-da89-464d-a02a-eb04e43141b5
2019-01-08 23:38:56 +00:00
asciimoo
f263602862 [enh] add environment variable support to configure listen address and secret key - closes #56
git-svn-id: file:///srv/svn/repo/yukari/trunk@78 f3bd38d9-da89-464d-a02a-eb04e43141b5
2018-05-30 15:14:37 +00:00
asciimoo
a6b2ecc870 [enh] v0.2.0
git-svn-id: file:///srv/svn/repo/yukari/trunk@77 f3bd38d9-da89-464d-a02a-eb04e43141b5
2018-05-28 13:30:49 +00:00
asciimoo
30585080fe [enh] v0.1.0
git-svn-id: file:///srv/svn/repo/yukari/trunk@74 f3bd38d9-da89-464d-a02a-eb04e43141b5
2018-01-30 18:46:11 +00:00
asciimoo
abd72ce047 [fix] hide morty popup ++ add link to source
git-svn-id: file:///srv/svn/repo/yukari/trunk@72 f3bd38d9-da89-464d-a02a-eb04e43141b5
2017-04-15 17:57:47 +00:00
asciimoo
9829a599d1 [fix] handle missing urls
git-svn-id: file:///srv/svn/repo/yukari/trunk@71 f3bd38d9-da89-464d-a02a-eb04e43141b5
2017-03-02 02:19:36 +00:00
alex
d0a2e1f525 [enh] for protocols others than HTTP(S) or for .onion domains, Morty serves a HTML page to the original URL with a warning.
git-svn-id: file:///srv/svn/repo/yukari/trunk@69 f3bd38d9-da89-464d-a02a-eb04e43141b5
2016-12-23 20:10:33 +00:00
asciimoo
f12bd0a629 Merge pull request #46 from dalf/html
[mod] different HTML / CSS modifications.

git-svn-id: file:///srv/svn/repo/yukari/trunk@68 f3bd38d9-da89-464d-a02a-eb04e43141b5
2016-12-23 19:25:28 +00:00
alex
9ed294432f [mod] fix HTML in the welcome page. Make sure the morty header is always visible with the same CSS style. Add an empty favicon.ico.
git-svn-id: file:///srv/svn/repo/yukari/trunk@67 f3bd38d9-da89-464d-a02a-eb04e43141b5
2016-12-23 17:58:04 +00:00
asciimoo
26bec6c5b8 [fix] package name
git-svn-id: file:///srv/svn/repo/yukari/trunk@66 f3bd38d9-da89-464d-a02a-eb04e43141b5
2016-12-21 23:28:11 +00:00
alex
04b1b48071 [mod] allow different content types according to two while lists.
The first white list doesn't modified the Content-Disposition header.
The second white list forces "attachment"

git-svn-id: file:///srv/svn/repo/yukari/trunk@64 f3bd38d9-da89-464d-a02a-eb04e43141b5
2016-12-21 17:10:56 +00:00
alex
04ff44b7ef [enh] parse and filter Content-Type.
svg, mathml, multipart, xml (because of namespace) are forbidden.
the charset parameters in Content-Type is only set when it is by the original server.
the */xhtml+* Content-Type : the conversion to UTF-8 is now done (it wasn't the case before).
string type is used because of the mime package API.

git-svn-id: file:///srv/svn/repo/yukari/trunk@63 f3bd38d9-da89-464d-a02a-eb04e43141b5
2016-12-15 22:32:34 +00:00
asciimoo
781a5a6588 Merge pull request #38 from dalf/uri
[enh] ignore all special characters in the URI protocol

git-svn-id: file:///srv/svn/repo/yukari/trunk@62 f3bd38d9-da89-464d-a02a-eb04e43141b5
2016-12-07 11:09:30 +00:00
alex
809239ddc1 [mod] data scheme URL : allow only images (png, jpeg, pjpeg, gif, webp)
git-svn-id: file:///srv/svn/repo/yukari/trunk@61 f3bd38d9-da89-464d-a02a-eb04e43141b5
2016-12-01 13:01:22 +00:00
alex
b9f693e84b [enh] ignore all special characters in the URI protocol (example : jav	ascript:alert('XSS'))
git-svn-id: file:///srv/svn/repo/yukari/trunk@60 f3bd38d9-da89-464d-a02a-eb04e43141b5
2016-12-01 12:45:38 +00:00
asciimoo
9583802a32 Merge pull request #40 from asciimoo/firefox-ua
[fix] Firefox  user agent instead of Chrome

git-svn-id: file:///srv/svn/repo/yukari/trunk@59 f3bd38d9-da89-464d-a02a-eb04e43141b5
2016-12-04 11:00:14 +00:00
alex
bf0abf4ce5 [fix] Firefox user agent instead of Chrome
Should fix #31

git-svn-id: file:///srv/svn/repo/yukari/trunk@58 f3bd38d9-da89-464d-a02a-eb04e43141b5
2016-12-03 11:56:10 +00:00
asciimoo
fd3b8ebc4c Merge pull request #39 from dalf/comment
[fix] ignore all comments

git-svn-id: file:///srv/svn/repo/yukari/trunk@57 f3bd38d9-da89-464d-a02a-eb04e43141b5
2016-12-04 10:58:41 +00:00
alex
5f7d8768fb [fix] ignore all comments (quick fix about the privacy issue with IE conditional comments)
git-svn-id: file:///srv/svn/repo/yukari/trunk@56 f3bd38d9-da89-464d-a02a-eb04e43141b5
2016-11-29 13:52:16 +00:00
asciimoo
c951f11200 [enh] add url proxifier tests ++ fix proxification user url part handling
git-svn-id: file:///srv/svn/repo/yukari/trunk@53 f3bd38d9-da89-464d-a02a-eb04e43141b5
2016-11-29 23:11:00 +00:00
asciimoo
46c188539b Merge pull request #37 from dalf/url_fragment
[fix] URI fragment are not encoded in the mortyurl

git-svn-id: file:///srv/svn/repo/yukari/trunk@52 f3bd38d9-da89-464d-a02a-eb04e43141b5
2016-11-29 12:30:07 +00:00
alex
b45f6c0afe [fix] URI fragment are not encoded in the mortyurl but are encoded as usual fragment so the browser can use them.
git-svn-id: file:///srv/svn/repo/yukari/trunk@51 f3bd38d9-da89-464d-a02a-eb04e43141b5
2016-11-29 10:35:59 +00:00
asciimoo
5f79df00a5 [fix] use html content-type on xhtml responses - closes #17
git-svn-id: file:///srv/svn/repo/yukari/trunk@50 f3bd38d9-da89-464d-a02a-eb04e43141b5
2016-11-29 10:12:48 +00:00
asciimoo
6202e9d41c Merge pull request #36 from dalf/head
svg, math, link and meta tags

git-svn-id: file:///srv/svn/repo/yukari/trunk@47 f3bd38d9-da89-464d-a02a-eb04e43141b5
2016-11-28 20:34:53 +00:00
alex
cd487310a3 * ignore svg and math tags (most of attributes are ignored in the current implementation)
* add hreflang attribute as a safe one ( allows <meta rel="alternate" hreflang="x" href="" /> )
* if the meta tag contains a http_equiv attribute:
** if the value is safe, output the meta tag with the http_equiv attribute (avoid the <meta content="IE=edge">)
** if the value is not safe, ignore the meta tag
* ignore link tag with unsafe rel attribute (preconnect, prerender, etc... : see http://microformats.org/wiki/existing-rel-values )
* output always output <meta http-equiv="X-UA-Compatible" content="IE=edge"> at the top of the head.

git-svn-id: file:///srv/svn/repo/yukari/trunk@46 f3bd38d9-da89-464d-a02a-eb04e43141b5
2016-11-28 17:38:17 +00:00
asciimoo
9aee27e43d Merge pull request #35 from dalf/url_encoding
Fetched URI matched the mortyurl.

git-svn-id: file:///srv/svn/repo/yukari/trunk@45 f3bd38d9-da89-464d-a02a-eb04e43141b5
2016-11-28 12:49:22 +00:00
alex
f8623282a5 [fix] fix #14. Fetched URI matched the mortyurl.
Query parameters in requested URI were parsed and set again. Unfortunately a query ?a&b were changed into ?a=b= which can lead to 404 errors.

git-svn-id: file:///srv/svn/repo/yukari/trunk@44 f3bd38d9-da89-464d-a02a-eb04e43141b5
2016-11-28 09:59:14 +00:00
asciimoo
ce7aee2e64 Merge pull request #32 from dalf/encoding
[enh] support different encodings

git-svn-id: file:///srv/svn/repo/yukari/trunk@43 f3bd38d9-da89-464d-a02a-eb04e43141b5
2016-11-26 16:49:35 +00:00
alex
be236f879b [enh] support different encodings (all encoding are convert to UTF-8 as before)
git-svn-id: file:///srv/svn/repo/yukari/trunk@42 f3bd38d9-da89-464d-a02a-eb04e43141b5
2016-11-26 12:45:12 +00:00
alex
7e303f3fe9 [fix] fix infinite loop with <base target=".." />
git-svn-id: file:///srv/svn/repo/yukari/trunk@40 f3bd38d9-da89-464d-a02a-eb04e43141b5
2016-11-26 10:16:11 +00:00
asciimoo
ba5cc3a702 [enh] forward content-disposition header
closes #21

git-svn-id: file:///srv/svn/repo/yukari/trunk@39 f3bd38d9-da89-464d-a02a-eb04e43141b5
2016-11-25 10:22:44 +00:00
asciimoo
e65b8cfd9e [enh] use href attribute of base tag for base URL if presented
closes #18

git-svn-id: file:///srv/svn/repo/yukari/trunk@38 f3bd38d9-da89-464d-a02a-eb04e43141b5
2016-11-25 10:15:31 +00:00
asciimoo
7cd3fb67cd [enh] display response errors to users ++ code formatting
git-svn-id: file:///srv/svn/repo/yukari/trunk@37 f3bd38d9-da89-464d-a02a-eb04e43141b5
2016-11-24 21:35:37 +00:00
asciimoo
348a8346f4 Merge pull request #28 from dalf/http_status_code
[mod] returns different HTTP status codes according to the errors

git-svn-id: file:///srv/svn/repo/yukari/trunk@36 f3bd38d9-da89-464d-a02a-eb04e43141b5
2016-11-24 21:30:15 +00:00
alex
00bd224041 [mod] different HTTP status codes according to the errors :
* 200 - no URL
* 403 - invalid mortyhash, or javascript content
* 500 - error parsing URI or getting the webpage
* 501 - .onion domain
* 503 - no Content-Type header in the response, or error decoding content
* 504 - timeout

git-svn-id: file:///srv/svn/repo/yukari/trunk@35 f3bd38d9-da89-464d-a02a-eb04e43141b5
2016-11-22 13:50:27 +00:00
asciimoo
0081614106 [fix] readable log messages
git-svn-id: file:///srv/svn/repo/yukari/trunk@33 f3bd38d9-da89-464d-a02a-eb04e43141b5
2016-11-24 19:49:56 +00:00
asciimoo
8716c2f731 Merge pull request #30 from dalf/html
[mod] static HTML

git-svn-id: file:///srv/svn/repo/yukari/trunk@32 f3bd38d9-da89-464d-a02a-eb04e43141b5
2016-11-24 19:46:31 +00:00
alex
3ff4bfcfeb [mod] static HTML :
* footer remains at the bottom except when the page is too small
* wider input box for URL
* information on proxyfied pages are (perhaps?) always display in the same way (same size, same font)
* the referrer is not sent to the original page (rel="noreferrer")

git-svn-id: file:///srv/svn/repo/yukari/trunk@31 f3bd38d9-da89-464d-a02a-eb04e43141b5
2016-11-23 20:55:12 +00:00
alex
6df6f6bb02 [fix] #20 : <meta http-equiv='refresh'> : URL with simple quotes or doubles quote are proxified correctly.
git-svn-id: file:///srv/svn/repo/yukari/trunk@29 f3bd38d9-da89-464d-a02a-eb04e43141b5
2016-11-23 16:57:17 +00:00
asciimoo
4422698257 Merge pull request #25 from dalf/cssurl
Fix #13 : some URL in CSS are not proxifed

git-svn-id: file:///srv/svn/repo/yukari/trunk@28 f3bd38d9-da89-464d-a02a-eb04e43141b5
2016-11-22 09:10:52 +00:00
alex
afebd341aa Fix #13
git-svn-id: file:///srv/svn/repo/yukari/trunk@27 f3bd38d9-da89-464d-a02a-eb04e43141b5
2016-11-21 22:36:58 +00:00
alex
f063eb1ef3 Fix #15
git-svn-id: file:///srv/svn/repo/yukari/trunk@25 f3bd38d9-da89-464d-a02a-eb04e43141b5
2016-11-21 22:40:27 +00:00
asciimoo
63b833ac86 [mod] disable ipv6 by default
git-svn-id: file:///srv/svn/repo/yukari/trunk@24 f3bd38d9-da89-464d-a02a-eb04e43141b5
2016-10-30 18:31:13 +00:00
asciimoo
c678b7763e [mod] proxification refactor
git-svn-id: file:///srv/svn/repo/yukari/trunk@23 f3bd38d9-da89-464d-a02a-eb04e43141b5
2016-10-30 16:54:54 +00:00
asciimoo
98adc74c0d [fix] attribute escaping - better solution in the future: https://github.com/golang/go/issues/17667
git-svn-id: file:///srv/svn/repo/yukari/trunk@21 f3bd38d9-da89-464d-a02a-eb04e43141b5
2016-10-30 12:24:56 +00:00
asciimoo
1419bf2e85 [fix] avoid fasthttp panic on .onion urls - see https://github.com/valyala/fasthttp/issues/196
git-svn-id: file:///srv/svn/repo/yukari/trunk@18 f3bd38d9-da89-464d-a02a-eb04e43141b5
2016-10-29 18:46:27 +00:00
asciimoo
dad05aa832 [enh] do not serve javascript files
git-svn-id: file:///srv/svn/repo/yukari/trunk@17 f3bd38d9-da89-464d-a02a-eb04e43141b5
2016-10-29 00:26:36 +00:00
asciimoo
65e5f60c75 [fix] css import expression - closes #7
git-svn-id: file:///srv/svn/repo/yukari/trunk@15 f3bd38d9-da89-464d-a02a-eb04e43141b5
2016-10-27 15:00:55 +00:00
asciimoo
5584b71ac7 [fix] case insensitive http-equiv refresh redirect handling - fixes #5
git-svn-id: file:///srv/svn/repo/yukari/trunk@14 f3bd38d9-da89-464d-a02a-eb04e43141b5
2016-10-27 14:47:30 +00:00