Commit Graph

13110 Commits

Author SHA1 Message Date
luccioman
cde237b687 Enforced access controls on some administrative actions.
- ensure use of HTTP POST method : HTTP GET should only be used for
information retrieval and not to perform server side effect operations
(see HTTP standard https://tools.ietf.org/html/rfc7231#section-4.2.1)
 - a transaction token is now required for these administrative form
submissions to ensure the request can not be included in an external
site and performed silently/by mistake by the user browser
2017-03-26 11:48:00 +02:00
luccioman
df5970df6d Extended Apache HTTP Digest Auth. for use of YaCy encoded password
When programmatically requesting the local peer with Apache http client,
authentication credentials must be passed as clear-text values. 
This extension to the apache org.apache.http.impl.auth.DigestScheme
permits use of the YaCy encoded password stored in the
adminAccountBase64MD5 configuration property.
2017-03-26 11:32:44 +02:00
luccioman
40403942db Updated dump/restore shell scripts : the API is now IndexExport_p.html 2017-03-26 10:59:04 +02:00
luccioman
29e5110627 Updated shell scripts to be compatible with HTTP Digest authentication
Because curl and wget do not let use a hashed password as parameter,
YaCy shell scripts which require authentication are now interactive by
default when HTTP Digest is the only available authentication method.
Batch mode can still be available trough the use of an environment
variable : YACY_ADMIN_PASSWORD.  

Other improvements :
 - added backward compatibility for Basic Authentication
 - fixed curl/wget presence detection 
 - do not return with exit code 0 when an API call failed, and print an
error message when the case occurs
 - documented available authentication options for API calls
2017-03-21 17:15:01 +01:00
reger
bdadbda5fa Update master lng file with added text in Settings_ServerAccess
remove outdated file entry in fr.lng & sk.lng
2017-03-21 01:16:16 +01:00
reger
c55d526cb8 Add hint how to build with maven (for the first time) to readme 2017-03-20 02:33:21 +01:00
reger
cbf58d5f0a Add hint text to default ServerAcess Port Settings page 2017-03-19 21:45:33 +01:00
reger
f05976c017 Display the local search word statistic in alphabetic order 2017-03-19 07:12:35 +01:00
reger
3dd23c178b Introduce the option to configure a shutdown port.
A port value of -1 will disable this option.

If set to a value greater 0, YaCy listens on this of on the local loopback 
address (127.0.0.1) for a shutdown or restart signal.
E.g. connect to http://localhost:8005/shutdown will stop the YaCy server.
http://localhost:8005/restart will restart it.
This option allows to stop YaCy locally independant from the web web 
frontend (which might be configured for password protected remote access).
2017-03-19 02:30:08 +01:00
reger
c4d5f1fc54 upd to slf4j-1.7.24.jar 2017-03-18 20:32:53 +01:00
reger
c4b90eae98 upd to icu4j-58_2.jar 2017-03-18 20:06:58 +01:00
reger
a2afb4bae0 add switchboardconstants for server ports config keys 2017-03-18 20:02:26 +01:00
reger
e0c5b28331 update to jsoup-1.10.2.jar 2017-03-17 02:19:33 +01:00
reger
5b5ada38c3 update to jsch-0.1.54.jar 2017-03-17 02:07:02 +01:00
reger
038b9cd98e update translation for ConfigNetwork_p.html 2017-03-15 22:36:53 +01:00
reger
f7fce1baad make digest default authentication in defaults/web.xml 2017-03-15 01:39:15 +01:00
reger
56d0a87a83 remove double occuance of geo:lat in rss tokens 2017-03-13 03:08:44 +01:00
reger
882d99dae4 upd to metadata-extractor-2.10.1.jar 2017-03-13 00:34:40 +01:00
reger
b4fa1141b8 implement RequestHeader getRequestURI, getRequestURL for legacy request 2017-03-12 01:54:56 +01:00
reger
209a7374bd remove unused import pdfParser 2017-03-09 22:57:51 +01:00
reger
de1c1c16db Improve pdf text extraction resource handling.
For sort pdf <= 3 pages use already extracted content,
only for long pdf > 3 pages reassign content and close internal writer (to direct free buffers)
2017-03-09 22:56:33 +01:00
reger
52c9d0c858 upd to pdfbox-2.0.4.jar 2017-03-09 22:50:19 +01:00
reger
9b6d1abd9e eliminate some compiler unchecked and deprecation warnings
in nav plugins by explicite type declaration and replacing date.getYear
with Calendar.get
2017-03-09 01:42:36 +01:00
reger
6eb7d27449 upd to httpclient v4.5.3 2017-03-08 22:35:48 +01:00
luccioman
8e77fe3860 Fixed unresolved pattern case in search results progress bar.
This is a fix for mantis 715 (http://mantis.tokeek.de/view.php?id=715).

A possible path scenario that could leading to this case :
 - YaCy is running low in memory
 - a search is requested
 - before the end of search results rendering, the cleanup job runs and
deletes the running search event from the cache because of short memory
 - then yacysearchitem renders with "-UNRESOLVED_PATTERN-" parameter
values passed to the statistics() JavaScript function
2017-03-08 10:27:18 +01:00
luccioman
79df5bb20a Fixed settingsAck_p.html back link for case where referrer is stripped. 2017-03-07 12:27:27 +01:00
reger
18c7563dbe Extend DCEntry.getLanguage convert to ISO639-1 codes for more languages
by using icu.ULocale for languages not already covered (ICU normalizes 
to ISO639-1 2 char codes).
Add test class
Use DublinCore vocabulary declarations in DCEntry and SurrogateReader 
for easier usage debugging, 
Init SurrogateReader.inputSource on first use.
2017-03-05 02:26:10 +01:00
reger
ce87025462 further avoid to set connect info properties as header value
following comment "use of properties as header values is discouraged"
in case where (proxy)HTTPClient overwrites values with supplied url.
Use defined request.referer procedure in response class.
2017-03-04 22:45:17 +01:00
reger
cd4d891ea4 use pre-defined "Connection" header key, replace depreceated 2017-03-04 19:41:31 +01:00
luccioman
5b03feb776 Fixed unresolved pattern case on /yacysearchlatestinfo.json api 2017-03-03 13:46:44 +01:00
luccioman
0173b0bc32 Added an advanced settings page for referrer policy settings.
Feedback will be welcome, notably on the descriptive content of this
page.
2017-03-03 12:05:30 +01:00
reger
81963a89fe fix proxyservlet response url to respect http scheme if a relative
Location header is returned.
2017-03-03 00:21:56 +01:00
luccioman
9d9f86dcdd Updated Archive-It heuristics URL.
The archive-it OpenSearch URL requested without restriction on
collections ("i" parameter) almost always ends up with timeout or fails.
2017-03-01 09:43:00 +01:00
luccioman
cdcd923375 Privacy enhancement : added settings to control referrer policy.
HTTP "Referer" header sent by the browser when using YaCy can now be
controlled either with the referrer meta tag as a global policy, or only
for search result links by adding the attribute rel="noreferrer".

To improve privacy with the less possible regressions, the default is
set as meta tag with value "origin-when-cross-origin" : internal YaCy
links behavior is not affected, but when visiting external websites
referrer url is not empty but stripped from query parameters and path.

Older browsers, Safari, MS IE and Edge do not support the referrer meta
tag, so the standard but less flexible noreferrer link type can also be
enabled as an alternative.

User-friendly settings page to be implemented.
2017-02-28 18:11:54 +01:00
reger
86534a56f7 fixed ReindexSolrBusyThread new and unexpected repeat of same query with
low number of found documents - by adding additional end condition to 
remove processed query with number of found docs <= process-chunck-size.

Noticed on query h4_txt:[* TO *], found 21, process 21, call of commit happend
but on next cycle same query again 21 docs found (while h4_txt was removed 
from schema and committed inputdocuments).
2017-02-27 23:00:46 +01:00
reger
0aa0dd0b5b fix delta time calculation in PerformanceSearch_p for the 1. entry
(INITIALIZATION displayed absolute date, set delta to 0 for 1. entry)
2017-02-27 01:04:31 +01:00
luccioman
13c5c09518 Fixed datacite.org heuristics base url.
The datacite Solr search http URL was returning http status 301 in order
to redirect to its https version, thus making that YaCy heuristic always
fail.
2017-02-26 11:03:15 +01:00
reger
275c0cddd1 Adjust DefaultServlet test case to recent change,
depreciate unused CONNECTION_PROP_PROTOCOL (also as it might be 
misleading with getProtocol vs getScheme)
2017-02-26 02:39:52 +01:00
reger
41e2ee0eca Fix call parameter for ConnectionInfo in MonitorHandler
(expected scheme e.g. http, was protocol version).
Depreceate obsolete custom X-...-Scheme header constant.
Use existing FORMAT_ANSIC Dateformatter in HeaderFramework.
Correct htmlParserTest (del one not intended println)
2017-02-25 23:55:17 +01:00
luccioman
9e626f6b00 Added a hint title for required fields in the Solr Schema editor 2017-02-24 11:09:42 +01:00
luccioman
ac766327d3 Switched a few more Solr fields from strictly mandatory to optional 2017-02-24 11:08:18 +01:00
reger
f254fcfc67 fix htmlParser <script> text extraction on code containing expression
recognized as tag like 1<a
reported in https://github.com/yacy/yacy_search_server/issues/109

Script content is ignored by default, but the text is filtered for html
tags. Modified scraper to skip tag filtering while within a <script> 
section (until a closing tag is detected </script>. 
Possible side effect, missing </script> end-tag will truncate trailing 
content text.
2017-02-24 01:25:32 +01:00
luccioman
2f191e0e1c Improved MultiprocotolURL non ASCII characters support.
After @sinkuu Pull Request #108 added JUnit tests, updated some JavaDoc
and also improved URL tokenization to support non ASCII characters.
2017-02-23 11:09:43 +01:00
luccioman
18e8b3a220 Merge branch 'escape' of https://github.com/sinkuu/yacy_search_server 2017-02-23 11:03:05 +01:00
luccioman
562fc14eb9 Merge pull request #110 from goofy-bz/patch-1
Fixing some typos
2017-02-23 07:52:55 +01:00
goofy-bz
72a1bc0af1 Fixing some typos
up to line #1000 only
2017-02-23 01:13:31 +01:00
reger
7419989de3 Correct dublincore title property text to lowercase in htmlresponsewriter,
remove unused (carry over) local variable
Do the same for other responsewriter.
2017-02-23 00:27:56 +01:00
Burkhard
4fdc11cae8 Update SearchEvent.java
Fix NPE on disabled local SolrIndex, occuring on search moving to the 2nd result page.
The debug purpose only setting to disabeling local SolrIndex (System Admin -> Debug Settings) should long term probably be removed from production code.
2017-02-22 02:01:48 +01:00
luccioman
cdc7f3e431 Switched some Solr fields from mandatory to optional
These fields are default enabled but with no doubt not strictly
mandatory with the current code base.

As reported by @reger24, splitting between essential mandatory and
optional fields is still to be improved to reflect the current YaCy
needs.
2017-02-21 22:59:11 +01:00
reger
7c188ad092 Add extract of queries.log in form of top search word cloud (last 7 days)
to AccessTracker_p.html (Network Access -> Local Search Log page).
It displays top 20 words of search queries.
2017-02-20 23:27:33 +01:00