1
1
Fork 0
mirror of https://code.mensbeam.com/MensBeam/Arsse.git synced 2024-12-23 17:12:41 +00:00
Commit graph

58 commits

Author SHA1 Message Date
J. King
27edcddc9b Simplify NCNv1 userStatus call 2018-10-28 13:59:09 -04:00
J. King
11747c93fd Strip out unused user management functionality
Tests have been removed as well; new tests are forthcoming
2018-10-28 10:59:17 -04:00
J. King
f64f0c6a22 Whitespace cleanup 2018-10-26 14:58:04 -04:00
J. King
34b508171b Merge CORS branch 2018-01-12 09:41:13 -05:00
J. King
aa57227097 Use PSR-7 for authentication; fixes #53 2018-01-11 15:48:29 -05:00
J. King
3fa2d38f31 Initial rewrite of REST class; needs more testing, but should be functional
- improves #53
- improves #66
2018-01-06 12:02:45 -05:00
J. King
890f9b07d4 Replace Resquest objects with PSR-7 request messages; improves #53 2018-01-04 23:08:53 -05:00
J. King
9eadd602bd Replace Response objects with PSR-7 response messages; improves #53
While the test suite passes, this commit yields a broken server: replacing ad hoc request objectss with PSR-7 ones is still required, as is emission of PSR-7 responses. Both will come in subsequent commits, with tests

Diactoros was chosen specifically because it includes facilities for emitting responses, something which is awkward to test. The end of this refactoring should see both the Response and Request classes disappear, and the general REST class fully covered (as well as any speculative additions to AbstractHanlder).
2018-01-03 23:13:08 -05:00
J. King
77793f95cb Controller fixes for PDO databases; fixes #72 2017-12-31 17:24:40 -05:00
J. King
a404d4d108 NCNv1: Be explicit about types; fixes #129
This is actually mandated by the specification: a change in data type requires a protocol version number change
2017-11-30 14:47:39 -05:00
J. King
22cdc8916d Documentation tweaks and CS fixes 2017-11-29 22:42:50 -05:00
J. King
5cd7268c0a Added incorrectDbCharset to NCNv1 server status
This has been exposed since version 11.0.3, released before our version 0.1.0, but after implementation work had begun
2017-11-29 18:14:59 -05:00
J. King
40944a9b58 Merge remote-tracking branch 'remotes/origin/ttrss' 2017-11-29 16:05:23 -05:00
J. King
3d958547a5 Implement OPTIONS requests for NCNv1; fixes #107 2017-11-29 15:28:33 -05:00
J. King
e1f1c8b859 Refactoring 2017-11-29 13:41:26 -05:00
J. King
b242c70968 Refactor of NCNv1 in anticipation of OPTIONS requests 2017-11-28 13:46:07 -05:00
J. King
b595815eb9 Change NCNv1 handler to use new "typical" articleList fieldset 2017-11-17 18:12:00 -05:00
J. King
c88b5c4f18 Make distinction between modified and marked for articles
Also added various sets of fields to include when listing articles.
2017-11-17 17:52:00 -05:00
J. King
6da86428c4 Added per-file legal boilerplate
Includes PHPDoc license tag in the file-level block with accompanying copyright notice.

Also added an AUTHORS file on the off chance of outside contributions
2017-11-16 20:51:03 -05:00
J. King
11b2066922 Added per-file legal boilerplate
Includes PHPDoc license tag in the file-level block with accompanying copyright notice.

Also added an AUTHORS file on the off chance of outside contributions
2017-11-16 20:23:18 -05:00
J. King
c6cd8b8aaa Removing request chunking from NCN controller 2017-11-07 10:00:31 -05:00
J. King
8c6c49d588 Merge changes from master 2017-10-19 22:58:42 -04:00
J. King
d45401fb8b Adapt NCN to new type converter
This has the side-effect of removing the ability to reset a feed's title by passing null explicitly. As a non-standard behaviour it was simpler to just remove it.
2017-10-19 20:35:45 -04:00
J. King
20ff08a431 Implement TTTRSS getCounters operation; fixes #79 2017-10-11 12:55:50 -04:00
J. King
7a2de95c70 Consolidate article context handling into articleQuery function
Also consolidated article star counting into a generic articleCount function which accepts a context.

This may lead to slight efficiency losses in either listing or marking (and more significant ones in counting starred), but the advantages of centralized context handling are significant with the future addition of labels and the need to count articles under various future contexts in TTRSS.
2017-10-06 20:26:22 -04:00
J. King
97b0134e56 Merge master 2017-10-02 15:42:15 -04:00
J. King
1b72d45adf Relegate bootstrap.php to testing; fixes #117 2017-10-01 09:33:49 -04:00
J. King
5488b994f7 Merged master; CS fixes 2017-09-28 10:16:24 -04:00
J. King
96ebf936e4 CS fixes 2017-09-28 09:01:43 -04:00
J. King
d365529493 Multiple fixes to input sanitization
- Database functions now accept any input, but throw typeViolation exceptions where appropriate instead of idMissing or subjectMissing
- Added unit tests for the new Misc\ValueInfo static class
- Added ValueInfo::id() method to centrally validate database IDs, and made use of it consistently
- Made use of PHP's filter_var() function where appropriate when validating or sanitizing input
- Made the NCN protocol handler reject most invalid IDs before handing off to method handlers
- Made NCN's feedUpdate and subscriptionMove methods return 422 on invalid input
- Adjusted several tests to handler type violations
2017-09-27 22:25:45 -04:00
J. King
c393dfc42b Sundry fixes
- Make use of PHP 7's null coalescing operator
- remove use of static property in Lang class
- Improve code coverage slightly
2017-09-05 19:35:14 -04:00
J. King
f7e50fe95d Passed code through linter 2017-08-29 10:50:31 -04:00
J. King
cc2296522c More changes in anticipation of a release:
- Don't load a config (and possibly create a database) in CLI if a configuration is not required
- Removed the 'dbSchemaBase' config option, which is really a testing hack
- Added sample Nginx configuration
- Fixed bug in REST handler
- Readme still needs work
2017-08-19 23:56:32 -04:00
J. King
52104fb647 Implement article cleanup; fixes #28 2017-08-17 22:36:15 -04:00
J. King
3b018c89d1 Implemented cleanup of orphaned feeds; fixes #25 2017-08-02 18:27:04 -04:00
J. King
5df7217cff Improve REST test coverage 2017-07-24 08:15:37 -04:00
J. King
d3bca6eb47 More code coverage accommodation 2017-07-20 22:40:09 -04:00
J. King
4cded011ff Complete implementations of server status and user status REST calls
- Fixes #30
- Fixes #31
- Avatars are not yet supported by the data model; blocked by issue #52
2017-07-19 18:07:36 -04:00
J. King
da092d5f8c Changed Misc\DateFormatter to a collection of static methods and renamed it to Date; renamed Data to Arsse to avoid confusion and better reflect its centrality 2017-07-17 07:47:57 -04:00
J. King
6d4aa4db6e Minimally functional, highly experimental, working server
- Basic update service handles only one feed at a time and possibly leaks memory
- Output for REST requests is still very basic
- No avatar support
- No reporting of whether cron works
- No cleanup before or after feed updates
2017-07-15 16:44:06 -04:00
J. King
4992b2c669 Tests for NCN v1 article listing and marking, with slight fixes
-Fixes #7
-Fixes #13
-Fixes #14
-Fixes #15
-Fixes #16
-Fixes #17
-Fixes #18
-Fixes #19
-Fixes #20
-Fixes #21
-Fixes #22
-Fixes #23
-Fixes #24
2017-07-09 17:57:18 -04:00
J. King
b3f631e335 Use more reliable database locking strategy; reorganize tests
PostgreSQL and MySQL both have better locking mechanisms than what was previously implemented, as well
2017-07-07 21:06:38 -04:00
J. King
17ec6cf669 Move date formatting out of SQL and standardize on the DateFormatter trait
Fixes #56
2017-07-07 15:25:47 -04:00
J. King
3fad820be4 REST functions for article listing and marking
Needs testing
2017-07-07 08:13:03 -04:00
J. King
483874e21d Implemented query contexts
- Fixes #55
- Included test for Context
- Adjusted Database::editionLatest() to use Context
- Adjusted NCN handler and tests accordingly
- Also refined experimental Database::articleList() method and added experimental Database::articlePropertiesSet() method
2017-06-18 10:23:37 -04:00
J. King
dd24246f49 Finished last of feedUpdate tests; implemented NCN API functions
- Fixes #26
- Fixes #27
2017-06-03 17:34:37 -04:00
J. King
81419452b5 Added topmost folder to output of subscriptionList. Fixes #54
- Adjusted NCN handler to use the topmost folder for folderId; suppressed the actual folder so as not to pollute output with non-standard data
- Updated tests
2017-06-01 18:12:08 -04:00
J. King
88c0f4986c Implement NCN API v1-2 feed handling: tests
- Fixes #8
- Fixes #9
- Fixes #10
- Fixes #11
- Fixes #12

- Differentiated between a missing ID which is the subject of an action (e.g. the subscription when moving a subscription) and other missing IDs (e.g. the folder when moving a subscription)
- Enforced same rules for subscription titles as for folder names, save that null is valid for subscriptions
2017-05-21 10:10:36 -04:00
J. King
054200dfc0 Fix potential of erroneous matching of URL containing encoded #. 2017-05-20 08:57:24 -04:00
J. King
0972cff660 Completely revamped NCNv1 REST handler
- URLs are now matched centrally against a whitelist
- %-encoded URLs are still handled correctly
- Dispatched methods now only handle one specific task
- Filler methods (e.g. versionPOST) are no longer required
- Unhandled URLs now return 501 Not Implemented rather than 404 Not Found; this removes some ambiguity in the semantics of 404
2017-05-19 23:52:26 -04:00