Commit Graph

165 Commits

Author SHA1 Message Date
shortcutme 31d4304915
Rev4471, Allow files start with dot 2020-03-21 19:51:44 +01:00
shortcutme c5d51c9cab
Verify cert in separate function 2020-01-04 16:54:34 +01:00
shortcutme 796ee572ce
Fix verify invalid json 2019-12-31 12:44:47 +01:00
shortcutme c2d2189039
Log content init failed as info 2019-12-17 14:23:47 +01:00
shortcutme 1eda3258de
Always raise error on verify error 2019-12-17 14:23:31 +01:00
shortcutme 0171cb0844
Avoid get db_inner_path for every file on signing 2019-12-17 14:23:18 +01:00
shortcutme 66a950a481
New, much faster worker task sorting 2019-11-25 14:43:28 +01:00
shortcutme cdd9dd4f6f
Fix duplicate content_db connecting 2019-11-19 02:12:24 +01:00
shortcutme d569d9488a
Deny invalid files on Windows 2019-11-07 02:47:19 +01:00
Josh 74d7d92a4d Allow all valid filenames to be added to content.json (#2141)
* Allow all valid filenames to be added to content.json

* Replace hex version of regex with non-hex version

* Add basic test for path validation with ASCII and UTF-8 filenames

* Amend path validation test to meet standards
2019-11-07 02:18:27 +01:00
Lola Dam 0738964e64 Save content.json of site even if limit size is reached (#2114)
* fix #2107; Still save the content.json received even if site size limit is reached but dont download files; Allow better distribution of latest version of content.json

* Added test

* Fix test for huge content file (now it fails)

* Dont download huge content.json file and update test

* Remove comments
2019-09-10 18:18:21 +02:00
Ivanq 1ed40b3b82
Allow files with `..` as a name substring 2019-08-19 07:09:32 +00:00
shortcutme 62401b24ec
Add r string literal for regexps 2019-07-01 16:24:23 +02:00
Lola Dam 753396ac0c Try and catch block for dbRebuild (#2047)
* Try and catch block for dbRebuild

* Use self.log.error and not logging

* Use self.log.error and not logging in SiteStorage also

* Check if the rebuild is working
2019-06-23 14:21:50 +02:00
shortcutme 2fa006d74e
Fix loading json files with utf8 content 2019-05-21 15:54:36 +02:00
shortcutme 043ac5a510
Log renaming 2019-05-02 17:17:00 +02:00
shortcutme fd085d2d37
Rev4086, Fix verify content.json files without files_optional 2019-04-29 16:54:07 +02:00
shortcutme 4ca0e6b781
Support file renames in content.json if the sha512 hash is the same 2019-04-23 01:56:11 +02:00
radfish f6e3a74567 [setuptools packaging] access modules via imports (#1969) 2019-04-15 12:31:33 +02:00
shortcutme 5642d0aae6
Also ignore db -wal and -shm temp db files when signing 2019-04-08 18:12:29 +02:00
shortcutme 77530f13ee
Fix content.json update and verify on Python 3.5 2019-03-20 00:48:51 +01:00
shortcutme 65d19d350c
We don't support old style sign verification anymore 2019-03-16 02:36:45 +01:00
shortcutme b0b9a4d33c
Change to Python3 coding style 2019-03-15 21:06:59 +01:00
shortcutme 259c5199d6
siteListModifiedFiles admin command 2019-02-02 00:11:47 +01:00
D14na f163abb4a5
Add support for tilde `~` in filenames.
(source: https://webpack.js.org/guides/code-splitting)

It appears that webpack (bundled w/ the VueJS CLI) will concatenate `chunk` names using the `~` to create one long "bundled" filename. This creates a problem when executing `isValidRelativePath` which DOES NOT allow `~`.

__An example error when signing:__
`Site:1... - [ERROR] Invalid filename: js/about~privacy~search.3c7ce85b.js`

A fix is to use the same name for each file/chunk, but then that breaks the optimizations of code splitting. Is there any reason NOT to permit tilde `~` as a valid filename character? _(NOTE: this may only be an issue if using vue-router)_
2019-01-24 08:41:27 -05:00
shortcutme 8e4873cf2a
Do a quick content.db check on startup 2018-12-15 18:39:39 +01:00
shortcutme d0f9d4de02
Fix invalid user auth address matching 2018-11-08 01:36:12 +01:00
shortcutme 6bc1ac1156
Support pattern based cert signers 2018-11-08 01:35:15 +01:00
shortcutme 171e5d3766
Fix typo on optional file deletion 2018-10-15 13:15:11 +02:00
shortcutme 46535cc7a8
File deletion based on type 2018-10-15 13:14:43 +02:00
shortcutme c12454a8e9
Don't delete pinned file if it removed by owner 2018-10-15 13:09:43 +02:00
shortcutme d124e2ed15
Support deletion of of all user submitted content that is older than specified date 2018-09-17 15:30:02 +02:00
shortcutme 00c9c14efb
Support listmodified before and after argument 2018-09-17 15:28:53 +02:00
shortcutme add83c4c7a
Missing content.json is a debug message 2018-04-28 21:45:28 +02:00
shortcutme 42b9ec819b
More verbose dbdict json loading logging 2018-04-28 21:45:13 +02:00
shortcutme af7c7da735
Optional file downloaded checking by separate function 2018-03-29 02:59:11 +02:00
shortcutme 508d2472e9
Only verify content after valid signiture 2018-03-29 02:55:53 +02:00
shortcutme f162987a4f
Rename optionalRemove to optionalRemoved and accept hash only by id 2018-03-29 02:54:52 +02:00
shortcutme adf39b6f6a
Avoid loading user content.json file on isArchived check 2018-03-18 21:26:20 +01:00
shortcutme c7d067ea3c
Rev3176, Skip listing ignored directories on signing 2017-12-20 23:25:25 +01:00
shortcutme 2b611ae798
Rev3148, Fix big site size calculation 2017-11-28 18:16:37 +01:00
shortcutme 972bef4f7d
Add invalid content.json to bad files 2017-11-19 18:19:45 +01:00
shortcutme e8f049a765
Strip / from content.json location of file_info 2017-10-26 10:43:10 +02:00
shortcutme 9d511ba165
Rev3122, Auto ignore database file 2017-10-22 11:13:09 +02:00
shortcutme 4efcfa8bf4
Rev3112, Allow user rules based on auth address 2017-10-16 20:26:41 +02:00
shortcutme c40f0c6919
Fix uploading bigfile to non-user directory 2017-10-16 15:11:19 +02:00
shortcutme f7ce401564
Function to remove invalid characters from file path 2017-10-04 13:25:07 +02:00
shortcutme 5dbaf02e33
Add content.json location to getFileInfo 2017-10-04 13:24:44 +02:00
shortcutme 2ef537ee6c
Fox user_address detection for sub-directories in user directory 2017-10-04 13:24:22 +02:00
shortcutme 74048ce53f
Update site size on startup and file archival 2017-10-04 13:20:39 +02:00