Commit Graph
2405 Commits
Author SHA1 Message Date
Alex Osborne c3f140b9b5 JDK18 support: Update Groovy to 3.0.10
Fixes #473 "Unsupported class file major version 62".
2022-04-01 11:34:11 +09:00
Alex Osborne 971f04dd23 TransclusionDecideRule: Don't treat sitemap links ('M') as transclusions
We should only crawl sitemaps and sitemap links if they are in the
primary SURT scope. Otherwise we'll start crawling the sitemaps of
every site an embedded resource is pulled in from even when they
should be out of scope.

Fixes #469
2022-03-28 13:47:49 +09:00
Alex Osborne d796491995 FetchHTTPTest: Fix SOCKS server startup race
testSocksProxy() is failing on the GitHub action CI runs but I can't
reproduce the issue locally. I'm just guessing this is what's causing it
but this should be fixed anyway to avoid future intermittent failures.
2022-03-28 13:26:53 +09:00
Alex Osborne 0dc05408da FetchHTTPTest: Don't test IP binding on macOS utun network interfaces
This avoids a test failure on macOS machines that are running Wireguard.
2022-03-28 11:40:48 +09:00
Alex Osborne 0d6c04fda5 FetchHTTPTest: Update to junit 4
By replacing the custom TestSuite with junit 4 @BeforeClass and
@AfterClass annotations running individual tests by themselves now works
correctly.

Since FetchHTTPTest now just contains the utility code for the test
servers we rename it to FetchHTTPTestServers. FetchHTTPTests (which
contains the actual tests) can now follow the standard naming
scheme as FetchHTTPTest.
2022-03-28 11:35:45 +09:00
Jamie Hoyle dd01689ace FetchHTTP: SOCKS5 proxy support
Closes #454
2022-03-28 10:24:07 +09:00
Alex Osborne 69f231b8ab Merge pull request #468 from internetarchive/remove-jna 2022-03-03 17:16:34 +09:00
Alex Osborne c6d4251e4f Merge pull request #459 from internetarchive/parse-link-rel 2022-03-03 17:16:22 +09:00
Alex Osborne 98f42de863 Merge pull request #460 from internetarchive/dependabot/maven/commons/org.springframework-spring-core-5.3.14 2022-03-03 17:14:46 +09:00
Alex Osborne 71b40cf882 Use Files.createLink() and Files.createSymbolicLink() instead of JNA
We don't need to support Java < 7 anymore. This simplifies the
code and should improve portability to platforms our old version of
JNA doesn't support like Apple Silicon.

Fixes #467
2022-03-02 21:37:27 +09:00
Alex Osborne 568d5cedfe Merge pull request #461 from kris-sigur/seed-redirect-tld
Add conf to not allow TLDs as seeds found via redirect from other seeds
2022-02-14 07:46:09 +09:00
Alex Osborne 4a75fe1fea Merge pull request #465 from ClemensRobbenhaar/issue464
Fix name of parameter in setMaxLogFileSize
2022-02-14 07:45:15 +09:00
Clemens Klein-Robbenhaar fae2ccb88d Fix name of parameter in setMaxLogFileSize
Fixes #464
2022-02-13 13:01:58 +01:00
Alex Osborne 1c4831d6e9 JerichoExtractorHTML: Determine LINK tag type by parsing REL attribute
This commit extends ExtractorHTML's link[rel] parsing support added in
dcf9b040 to also cover JerichoExtractorHTML.
2022-01-27 12:07:07 +09:00
dependabot[bot] ab27a48e26 Bump spring-core from 5.3.3 to 5.3.14 in /commons
Bumps [spring-core](https://github.com/spring-projects/spring-framework) from 5.3.3 to 5.3.14.
- [Release notes](https://github.com/spring-projects/spring-framework/releases)
- [Commits](https://github.com/spring-projects/spring-framework/compare/v5.3.3...v5.3.14)

---
updated-dependencies:
- dependency-name: org.springframework:spring-core
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-27 03:03:08 +00:00
Alex Osborne dcf9b04007 ExtractorHTML: Determine LINK tag type by parsing REL attribute
Only treat icons, stylesheets and (tentatively) resource preloads as
embedded resources. Treat most other link types as navigation links.

Previously we were treating all link tags as embedded resources
including links like 'next', 'prev', 'canonical', 'author' which could
pull in resources that should normally be considered out of scope.

For example crawling a page containing an author link lke:

   <link href="http://twitter.com/example" rel="author">

Would end up transitively pulling 200+ MB of Twitter profile pages in
multiple languages into a crawl for which twitter.com is not even
supposed to be in scope at all.

Fixes #263
2022-01-25 17:57:54 +09:00
Alex Osborne d40a025692 Merge pull request #452 from internetarchive/handle-nulls-in-content-length-header
FetchHTTP: Handle null characters in the Content-Length header
2022-01-17 16:20:12 +09:00
Alex Osborne aa4f0f9933 Merge pull request #457 from ClemensRobbenhaar/issues191-https-over-proxy
Fix issue#191: "RIS already open for ToeThread..." exception during https pages crawl over proxy
2022-01-17 16:18:13 +09:00
Clemens Klein-Robbenhaar 261fa318b4 FetchHTTPRequest: handle HTTPS requests via proxy
- do not send the scheme/host/port part of the request
  even when using a proxy, if the scheme is https
- in case of a https request send over a proxy, do not
  wrap the first input/output streams (which only contain
  the data for the `CONNECT` request), but the ones after
  them, which contain the actual data

Fixes #191
2022-01-10 08:57:22 +01:00
Oliver Schihin c4edadf1a8 Configuration guide: clarify usage of ContentTypeMatchesRegexDecideRule 2021-12-21 19:10:22 +09:00
Alex Osborne a3d651ba46 FetchHTTP: Handle null characters in the Content-Length header
If a null character appears in the Content-Length header Firefox and
Chrome seem to ignore the rest of the value so let's do the same.
Let's also handle the exception when parsing the content-length fails.

Fixes #449
2021-12-13 15:41:38 +09:00
Alex Osborne 140211e8c2 Link to the structured documentation in the README 2021-12-13 14:20:33 +09:00
Alex Osborne 52733b9dc0 README: Fix javadoc badge and add docker badge 2021-12-13 14:15:21 +09:00
Alex Osborne 65c1025546 Make the docker build manually triggered
Currently it's only building the last interim release so there's not much point rerunning it on each commit.
2021-12-13 14:06:25 +09:00
Alex Osborne b73a8d0356 docker ci: set working-directory
Looks like the Dockerfile expects entrypoint.sh to be in the current working directory.
2021-12-13 14:01:45 +09:00
Alex Osborne bad8bbd1ee Move docker-image.yml to .github/workflows
Not sure why it ended up here as I created it through the new workflow wizard. I guess I hit a bug.
2021-12-13 13:58:55 +09:00
Alex Osborne 31c9378888 Create docker-image.yml 2021-12-13 00:58:43 +09:00
Alex Osborne 0f9109ba9f Merge pull request #450 from Querela/360-docker
Add Dockerfile
2021-12-13 00:50:20 +09:00
Erik Körner 3a5b758d5e Docs (temp) 2021-12-10 16:39:17 +01:00
Erik Körner 17c9694039 Add Dockerfile 2021-12-10 15:35:03 +01:00
Alex Osborne d83e799ad9 Merge pull request #448 from ldko/resolve-gid-too-big
Resolve gid too big
2021-12-04 13:23:21 +09:00
Lauren Ko a0f0ba45e5 Fix files included by assembly 2021-12-03 16:05:59 -06:00
Lauren Ko 256f8742e9 Fix group id is too big 2021-12-03 12:20:32 -06:00
Alex Osborne d11d02eeac docs: Add 'Loading Cookies' section to config guide 2021-11-29 12:11:54 +09:00
Alex Osborne d63cb9af8b Merge pull request #444 from internetarchive/fix-dnsjava-selector-thread
FetchDNS: Keep dnsjava selector thread out of ToePool
2021-11-27 12:41:11 +09:00
Alex Osborne c46cfd1c31 Merge pull request #441 from netarchivesuite/iipc-master
Enabled configurable url-matching and extraction for sitemaps.
2021-11-02 10:34:26 +09:00
Alex Osborne 1832c5ef89 FetchDNS: Keep dnsjava selector thread out of ToePool
dnsjava will create its global selector thread on first DNS lookup.
Since the first lookup occurs on a toe thread then this will cause the
selector thead to join the job's toe thread group. This is a problem
because when the job is terminated ToePool sends an interrupt to all
threads in the thread group which the dnsjava selector thread is
not expected and never clears. The interrupted state then causes
select() to return immediately instead of sleeping so it consumes
100% CPU.

So workaround this by doing a dummy lookup when FetchDNS is loaded,
this ensures the first lookup happens on the web server thread that
handles the job build action instead of a toe thread.

Fixes: 045b2516da ("Update to latest version of dnsjava")
2021-11-01 16:15:27 +09:00
Alex Osborne 513c5fc487 FetchDNS: Move DNS cache init from CrawlController
Since the cache is global we only need to configure it once, not every
time we start a job. By moving it we keep the code that interfaces with
dnsjava centralized in FetchDNS.

Looks like dnsjava no longer uses a cleaner thread so remove the comment
referring to it.
2021-11-01 16:15:27 +09:00
Kristinn Sigurdsson 69b023199d Add conf to not allow TLDs as seeds found via redirect from other seeds 2021-10-21 09:39:19 +00:00
Alex Osborne 17d760aa78 Remove obsolete Java < 1.6 version check
The parsing throws StringIndexOutOfBoundsException when the version
does not contain '.' such as version "17". This check could never
actually trigger as the class cannot even be loaded on 1.7 or earlier,
so there's no reason to keep it.

Fixes #439
2021-09-30 09:59:57 +09:00
Alex Osborne 698341a1d6 Github action: test against JDK 17 (LTS) instead of 16 2021-09-30 09:12:54 +09:00
Andrew Jackson c373c8e95e Re-sync changelog for 20210923 2021-09-23 23:58:54 +01:00
Andrew Jackson 024a7772b5 [maven-release-plugin] prepare for next development iteration 2021-09-23 22:08:33 +01:00
Andrew Jackson fedff1e2c7 [maven-release-plugin] prepare release 3.4.0-20210923 3.4.0-20210923 2021-09-23 22:08:30 +01:00
Andrew Jackson 16ab42973b Resync changelog. 2021-09-23 22:03:51 +01:00
Andy Jackson 2101a8c0f3 Merge pull request #434 from ukwa/safer-cookie-iteration
Add safer cookie iteration
2021-09-23 21:35:23 +01:00
Alex Osborne c1b1b11163 SECURITY.md: Use HTTPS for PANDORA contact link 2021-09-11 11:13:42 +09:00
Alex Osborne 5fcb9f4084 SECURITY.md: add mising 'the' 2021-09-11 10:59:49 +09:00
Alex Osborne 46d7e06bce Create SECURITY.md
Fixes #429
2021-09-11 10:51:27 +09:00
Alex Osborne 780abb0b1d docs: Update AdoptOpenJDK link as it has been rebranded Adoptium
https://blog.adoptopenjdk.net/2021/08/goodbye-adoptopenjdk-hello-adoptium/
2021-09-11 07:53:18 +09:00