Граф коммитов

2046 Коммитов

Автор SHA1 Сообщение Дата
dependabot[bot] 96f94c7756
Bump css-what from 5.0.0 to 5.0.1 in /openwpm/Extension/firefox (#935)
Bumps [css-what](https://github.com/fb55/css-what) from 5.0.0 to 5.0.1.
- [Release notes](https://github.com/fb55/css-what/releases)
- [Commits](https://github.com/fb55/css-what/compare/v5.0.0...v5.0.1)

---
updated-dependencies:
- dependency-name: css-what
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-06-10 12:22:36 +02:00
Stefan Zabka ddd6f0be0a
V0.16.0 release preparations (#934)
* V0.16.0 release preparations

* Added changelog
2021-06-10 10:13:26 +02:00
Stefan Zabka 3ff9bf6c4e
Introduced update.sh (#931) 2021-05-25 17:55:02 +02:00
Stefan Zabka 2cb831fac5
Reenabling extension tests (#929)
* Fixed and enabled extension tests

* Narrowed types for display_mode

* Updated package-lock.json

* Removed storage.rst
2021-05-24 13:05:41 +02:00
Stefan Zabka 613e7d6633
Fixed default extension config (#927)
* Fixed default extension config

* Updated dependencies
2021-05-24 12:05:40 +02:00
Georgia Kokkinou c7849bca2f
Expand profile tests (#924)
* Test browser profile recovery in various scenarios

Add a test that implements the following test matrix and checks that the
profile behavior is the expected in each case:

  * Crash types: normal operation, crash during page visit,
                 crash during launch, timeout during page visit
  * Operational mode: stateful, stateless
  * Seed profile: exists, doesn't exist

* Move profile tests to a separate CI job

* Test saving the browser profile using a command

* Remove unused manager_params arg from load_profile

* Test that load_profile does not modify tar file

* Test crashing during Task Manager initialization

* Remove some redundant testcases

Adjust the parameterization of test_profile_recovery in order to remove
the `stateless-without_seed_tar` testcases, as they are not adding any
value.
2021-05-19 12:17:19 +02:00
vringar b1dbee125a Updated package-lock.json 2021-05-18 13:58:54 +02:00
Ayush Anand 26baadc8dd
Added RTD link to Readme (#923) 2021-05-12 15:52:52 +02:00
Stefan Zabka 6a40b9460b
Preparations for v0.15.0 release (#913)
* Preparations for v0.15.0 release

* removed warning about v0.14.0 and v0.14.1

* Comment formatting

* Fixed date in Changelog

As well as formatting and spelling

Co-authored-by: Georgia Kokkinou <geor5ko@gmail.com>

* Update openwpm/task_manager.py

Co-authored-by: Georgia Kokkinou <geor5ko@gmail.com>

* Updated VERSION file

* Getting GCSFS to work again

* Set black to the version

* Updated JS dependecies

Co-authored-by: Georgia Kokkinou <geor5ko@gmail.com>
2021-05-10 18:48:47 +02:00
Ayush Anand 7e126af0b0
Move config documentation into docstrings (#920) 2021-05-10 18:01:23 +02:00
Georgia Kokkinou 889b54d429
Save full Firefox profile (#917)
* Save full Firefox profile

Save the whole Firefox profile directory instead of only saving a few of
its subcomponents. Remove an unused import of shutil from
profile_commands.py.

Additionally, remove the `extension_port.txt` file after reading the
port from it, to prevent reading stale port information when a browser
is restarted after a crash.

Finally, remove a part of the documentation that references the old way
of dumping the profile and update a leftover reference to the
`log_directory` config option.

Closes #62.

* Test saving full profile

Add a test that checks that attempting to save an incomplete profile
raises an error. Also, extend `test_saving` to check that a few basic
files and directories of the Firefox profile are present in the archived
profile.
2021-05-07 13:33:17 +02:00
Stefan Zabka dafc26cb56
Blocking on startup (#902)
* Refactored BrowserManager into class

* Completing refactor

* Improved type annotations

* Blocking on OPENWPM_STARTUP_SUCCESS.txt

* Cherrypicked changes from logging_extension_test

* Intermediate

* Implemented test

* Refactoring shutdown control flow

* Refactored status_queue check in close_browser_manager

* Updated log message

* Update openwpm/browser_manager.py

Co-authored-by: Steven Englehardt <senglehardt@mozilla.com>

* Guarded property access

* Fixed timeout code

* Fixing up docstrings

Co-authored-by: Steven Englehardt <senglehardt@mozilla.com>
2021-05-03 12:57:56 +02:00
Stefan Zabka 9943a218ca
Fixing extension logging (#912)
* Combined log_directory and log_file to log_path

* Updated documentation

* Fixed tests

* Implemented test, need to change CSP

* Extension logging restored and tested

* Renamed extra to custom_params

* Reverting stackdump changes
2021-04-30 19:38:08 +02:00
Stefan Zabka 05e5dcb0a5
Combined log_directory and log_file to log_path (#911)
* Combined log_directory and log_file to log_path

* Updated documentation

* Fixed tests
2021-04-30 16:52:22 +02:00
Ayush Anand 18e12864ce
Added npm script info under scripts (#908) 2021-04-29 16:36:30 +02:00
Stefan Zabka 262e4f2847
Browser manager as class (#901)
* Refactored BrowserManager into class

* Completing refactor

* Improved type annotations
2021-04-28 14:45:36 +02:00
Georgia Kokkinou 3619b55682
Update profile tests (#893)
* Re-enable test_profile_saved_when_launch_crashes

Update `test_profile_saved_when_launch_crashes` so that it does not
depend on the no longer supported proxy to make browser restarts fail.
Instead, set the `FIREFOX_BINARY` environment variable to point to a
wrong path.

Also, fix a bug in `kill_browser_manager()`, which would cause OpenWPM
to crash because of a `psutil.NoSuchProcess` exception and without
archiving the browser profile, whenever a browser restart failed to
launch geckodriver.

Finally, make `kill_process_and_children()` use the timeout set via its
arguments, which it previously ignored.

* Update docstring of dump_profile

Add a note for callers that they should make sure Firefox is closed, in
order to prevent ending up with a corrupted database in the archived
profile.

* Update test_browser_profile_coverage

Remove the buggy and outdated for loop that determined whether a url is
expected to be missing from the places.sqlite database of the browser
profile, as we have not observed any missing urls when running this
test.
2021-04-28 13:04:10 +02:00
Stefan Zabka a159496e22
Fixed default directories in ManagerParams (#903)
Our default was to create a literal folder called ~ instead of writing to the homedir
2021-04-27 16:29:15 +03:00
Stefan Zabka cc10baebee
Warning against using v0.14.1 and v0.14.0 (#899) 2021-04-26 17:07:35 +02:00
Georgia Kokkinou 07d89ca7f4
Generate module index (#900)
* Fix documentation module index

Populate the module index by setting up Sphinx to automatically run
sphinx-apidoc for every build. Also, move readthedocs dependencies under
docs/ and make prune-environment.py automatically generate the
environment-rtd.yaml file whenever we run repin.sh.

* Fix black and mypy errors
2021-04-26 17:05:30 +02:00
Stefan Zabka 6efeade359
Updated NPM dependencies (#888) 2021-04-20 15:30:42 +02:00
Stefan Zabka 3ed53b5429
Created environment-rtd.yaml (#894)
* Created environment-rtd.yaml

* Removed all non-sphinx dependencies
2021-04-20 16:10:22 +03:00
Stefan Zabka 625d81460b
Introducing Sphinx (#863)
We can now generate documentation to a variety of display formats including HTML by using sphinx.
With this new infrastructure we are now also able to generate documentation on readthedocs.io.

Co-authored-by: jhabarsingh <jhabarsinghbhati23@gmail.com>
Co-authored-by: Cyrus <cyruskarsan@gmail.com>
Co-authored-by: cyruskarsan <55566678+cyruskarsan@users.noreply.github.com>
Co-authored-by: Steven Englehardt <senglehardt@mozilla.com>
Co-authored-by: ankushduacodes <61025943+ankushduacodes@users.noreply.github.com>
Co-authored-by: Mollie Bakal <bakalm@umich.edu>
Co-authored-by: MollieBakal <molliebakal@gmail.com>
Co-authored-by: jhabarsingh <43932986+jhabarsingh@users.noreply.github.com>
Co-authored-by: Georgia Kokkinou <geor5ko@gmail.com>
2021-04-15 12:04:55 +02:00
Stefan Zabka e72ed2339c
Removing localtest.me (#886)
* Removing localtest.me

As it has been highly unreliable when running
local tests (returning DnsNotFound errors)

* Fixing tests

* Switched to localhost

* Localtest.me to localhost
2021-04-13 17:39:03 +02:00
Stefan Zabka e20fc6a29e
Moved _issue_command to BrowserManagerHandle (#882)
* Renamed Browser to BrowserManagerHandler

* Renamed TaskManager._issue_command to BrowserManagerHandle.execute_command_sequence

* Fixing stuff

* Apply suggestions from code review

Co-authored-by: Georgia Kokkinou <geor5ko@gmail.com>

* tm to task_manager

* Found and renamed only mention of  in the docs

Co-authored-by: Georgia Kokkinou <geor5ko@gmail.com>
2021-04-12 16:22:59 +03:00
Georgia Kokkinou b8f6262cb2
Clean up some unused files (#881)
* Remove some unused files

* Fix minor typos
2021-04-06 14:26:49 +02:00
Stefan Zabka 8030c2c470
Remove python to js string (#879)
Introduced `cleaned_js_instrument_settings` in BrowserParamsInternal to hold the expanded config dict.
Propagating the `js_instrument_settings` through the extension as an object for as long as possible.
2021-03-30 14:22:02 +02:00
Steven Englehardt bfc4644a71
Merge pull request #864 from boolean5/restore-stateful-crawls
Restore stateful crawling support
2021-03-29 11:34:05 -04:00
Stefan Zabka 358c8a7337
Restoring Docker build (#871)
GitHub Action based on https://github.com/usha-mandya/SimpleWhaleDemo/blob/master/.github/workflows/github_registry.yml

Everything on the master branch gets published as `:latest` and version tags (pattern `vx.y.z`) get published as `:x.y.z`
2021-03-29 14:08:05 +02:00
Stefan Zabka 3241482608
Adjusted check for debug mode in loggingdb.js (#878)
This way the default config in index.js and the check in loggingdb.js
match up
2021-03-29 12:30:39 +03:00
Stefan Zabka 9a8dea34d9
Hotfixed GetCommand (#875)
webdriver.switch_to.alert unlike most other variants of the switch_to API is not a function but a property.
This led to TypeError:'Alert' object is not callable when there was actually an Alert to switch to.
This PR fixes that behaviour.
2021-03-23 22:38:09 +01:00
Georgia Kokkinou 37271ba62d
Remove unnecessary import 2021-03-22 19:22:17 +02:00
Georgia Kokkinou 9a21d86e8f
Simplify PatchedGeckoDriverService class
Make `PatchedGeckoDriverService` class subclass
selenium.webdriver.firefox.service.Service instead of
selenium.webdriver.common.service.Service, so that we only have to keep
track of the changes in the `__init__()` method of the former class.
2021-03-22 15:57:01 +02:00
Georgia Kokkinou 49965db164
Use local test server in profile tests 2021-03-22 12:54:24 +02:00
Georgia Kokkinou 06b83596ab
Do not copy tar before extracting in load_profile 2021-03-21 23:59:51 +02:00
Georgia Kokkinou e536c630cc
Add comment for Marionette port race condition 2021-03-21 23:59:51 +02:00
Georgia Kokkinou 9e8298c455
Fix test_browser_profile_coverage
Use the public suffix + 1 instead of the public suffix when comparing
the domains in the crawl database with those in the profile history.
Also, update an incorrectly formed query to the crawl database.
2021-03-21 23:59:51 +02:00
Georgia Kokkinou c51f9e56bf
Fix minor typos 2021-03-21 23:59:18 +02:00
Georgia Kokkinou a19b12478b
Remove `reset=True` from tests 2021-03-19 21:14:51 +02:00
Georgia Kokkinou 3b4219d0f9
Add some type annotations 2021-03-19 21:09:20 +02:00
Steven Englehardt ab01a2f6bd
Remove commented out code; monitor speculative connections (#872) 2021-03-19 11:50:21 +01:00
Georgia Kokkinou 1e16513370
Improve profile dumping logic
Move the core implementation of profile dumping into a `dump_profile`
function, which can be used both internally when closing or restarting a
crashed browser and from the `execute()` method of `DumpProfileCommand`.
Also, make compression the default in `DumpProfileCommand`. Finally, do
not compress the tar archive of the crashed browser's profile when
restarting from a crash. We should avoid the extra compression/
decompression step as this is a short-lived tar file.
2021-03-16 17:10:50 +02:00
Stefan Zabka b6849c71f5
Release preparations (#866)
* Release preparations

* Apply suggestions from code review

Co-authored-by: Steven Englehardt <senglehardt@mozilla.com>

* Bumped typedoc version number

Co-authored-by: Steven Englehardt <senglehardt@mozilla.com>
2021-03-16 15:23:05 +01:00
Stefan Zabka 7624476b3b
Updated wording for profiles (#865)
* Updated wording for profiles

Co-authored-by: Georgia Kokkinou <geor5ko@gmail.com>
2021-03-16 14:22:53 +01:00
Georgia Kokkinou 3f7efc2490
Skip test_browser_profile_coverage locally 2021-03-15 16:01:47 +02:00
Georgia Kokkinou 9ea8e8a051
Rename temp dir of crashed browser's profile tar 2021-03-15 15:37:12 +02:00
Georgia Kokkinou aa1de922c9
Add reminder to update geckodriver prefs 2021-03-15 15:15:28 +02:00
Georgia Kokkinou f5bacaed84
Update manual_test.py
Running manual_test.py resulted in an error because the `xpi()` fixture
was called directly. Apply the fix suggested in
https://docs.pytest.org/en/stable/deprecations.html#calling-fixtures-directly
Also, use a custom profile instead of `FirefoxProfile` and update some
docstrings.
2021-03-15 13:44:36 +02:00
Georgia Kokkinou 1d3de72292
Reference our own issue instead of geckodriver's 2021-03-15 12:23:06 +02:00
Georgia Kokkinou d2aff836f4
Remove unused status string "Proxy Ready" 2021-03-15 11:09:44 +02:00