Commit graph

55 commits

Author SHA1 Message Date
DaneEveritt
3f99b00cf7
Fix display exception handling 2022-05-22 18:21:38 -04:00
DaneEveritt
0fa33e0438
Mark a request as being stateful if a cookie for the session is provided at all
This accounts for poorly configured API clients that try to use cookies for authentication purposes. Treat everything with a session cookie as being a stateful request from the front-end.
2022-05-22 16:50:36 -04:00
DaneEveritt
33bafe9277
Simplify transformer logic 2022-05-22 16:23:22 -04:00
DaneEveritt
f7fc67344e
Ensure tokens are found in the database using the expected logic 2022-05-22 16:05:58 -04:00
Dane Everitt
c449ca5155
Use more standardized phpcs 2021-01-23 12:33:34 -08:00
Dane Everitt
a043071e3c
Update to Laravel 8
Co-authored-by: Matthew Penner <me@matthewp.io>
2021-01-23 12:12:54 -08:00
Dane Everitt
b4a9a7205d
speeling is hard 2020-10-03 12:14:39 -07:00
Dane Everitt
1616cf1318
Always show errors from HTTP exceptions correctly to the user; closes #2439 2020-10-03 11:18:14 -07:00
Dane Everitt
1b0a6252f1
Fix undefined index error; closes #2378; closes #2391 2020-09-22 19:58:30 -07:00
Dane Everitt
f293c73977
Return the broken rule in the validation error response 2020-08-27 21:15:23 -07:00
Dane Everitt
e863683582
Treat validation errors the same as a normal error; match the output exactly 2020-08-27 19:26:52 -07:00
Dane Everitt
61e9771333
Code cleanup for subuser API endpoints; closes #2247 2020-08-19 20:21:12 -07:00
Dane Everitt
c3aa257a2b
Update dependencies to latest versions 2020-06-23 21:24:37 -07:00
Lance Pioch
ce614ad54f
Clean sensitive email connection info 2019-09-25 15:53:38 -04:00
Dane Everitt
7543ef085d
Format files 2019-09-05 21:32:57 -07:00
Dane Everitt
7ecb28b598
[L6] No longer necessary with L5.8 2019-09-04 20:28:37 -07:00
Dane Everitt
a66d7a3417
Merge branch 'develop' into feature/vuejs 2019-03-09 11:19:07 -08:00
Dane Everitt
cf31d4276c
Fix a bug causing DataIntegrityExceptions to not be caught correctly and cause a second exception... whoops. 2019-03-03 13:42:32 -08:00
Dane Everitt
114afb8646
Fix error transaction handling when creating a server.
There is a bug in the design of the application that affects users who encounter an exception under certain code pathways who are using the database to maintain their sessions.

What is happening is that a transaction is started, and I made the mistake of just assuming it would auto-rollback once the exception was caught by the handler. This is technically true, since once the request terminates the transaction is discarded by the SQL server. However, this also means that the session data set on that request would not be persisted as it runs in a middleware termination function, after the transaction is started.

Theoretically this would also affect any other terminable middleware as well, but the session is the only one I can think of right now

Co-Authored-By: Oreo Oreoniv <zkoz210@users.noreply.github.com>
Co-Authored-By: Stepan Fedotov <trixterthetux@users.noreply.github.com>
2019-03-02 18:28:28 -08:00
Dane Everitt
a7fae86e58
Treat unauthenticated exceptions the same as everything else 2018-07-14 22:42:38 -07:00
Dane Everitt
bde4d4187f
Merge branch 'develop' into feature/api-integration-testing 2018-03-21 22:25:16 -05:00
Dane Everitt
e5c59c4984
Change exception handling for display exception 2018-03-10 13:02:41 -06:00
Dane Everitt
bbbab4bf81
Handle error codes from custom rules better 2018-03-04 22:21:23 -06:00
Dane Everitt
1eb76c4457
Log more information for PDOExceptions while also keeping passwords out. 2018-02-18 14:31:40 -06:00
Dane Everitt
f42bc8a031
Cleanup exception reporting, stop logging PDO exception stacks.
PDOException stacks include the MySQL password for the connection attempt and many people do not realize this when providing logs.
2018-02-04 13:31:39 -06:00
Dane Everitt
97ee95b4da
Fix some error handling 2018-01-27 13:26:43 -06:00
Dane Everitt
aca0819bcd
Add server build management to API 2018-01-21 16:02:03 -06:00
Dane Everitt
54b6fb5ebd
More work on the API utilizing Laravel 5.5 exception rendering
Also corrects API format to maintain JSONAPI spec
2017-12-17 14:57:05 -06:00
Dane Everitt
4a65dff940
Implement admin user management API routes 2017-12-16 11:31:18 -06:00
Dane Everitt
0f0c319ec0
Allow exceptions to throw their own error codes from within.
Temp work-around for tons of logic until upgrade to 5.5 is done.
2017-09-24 12:32:29 -05:00
Dane Everitt
906a699ee2
Begin implementation of new daemon authentication scheme 2017-09-23 20:45:25 -05:00
Dane Everitt
3ee5803416
Massive PHPCS linting 2017-08-21 22:10:48 -05:00
Dane Everitt
b8d7d99096
More repository/service/refactor changes 2017-08-12 15:29:01 -05:00
Dane Everitt
a4b61846ac Apply fixes from StyleCI (#577) 2017-08-05 17:26:30 -05:00
Dane Everitt
acbc52506c
Finish unit tests for all server services 2017-07-22 20:15:01 -05:00
Dane Everitt
580e5ac569
Begin working on administrative server view changes
Also includes tests for the DatabaseCreation service.
2017-07-21 21:17:42 -05:00
Dane Everitt
cce27dfff1
Fix API response to show correct error. 2017-05-22 19:25:26 -05:00
Dane Everitt
93d79994f8 Apply fixes from StyleCI (#372) 2017-04-09 19:16:39 -04:00
Dane Everitt
c492446513
Implement initial server and location API routes.
Also fixes a few exception handler issues causing incorrect HTTP status
codes on authorization errors.
2017-04-09 13:15:15 -04:00
Dane Everitt
97773300ed
Better middleware for routes, cleaned up API, removed old API calls
New API routes for Server allow specifying which fractal objects to
load into the request, thus making it possible to fine-tune what data
is returned.
2017-04-02 13:19:39 -04:00
Dane Everitt
87530cdc01
Initial moves to new API scheme.
Implements a better middleware for handling API authentication, as well
as cleaner route handling.
2017-04-02 00:11:52 -04:00
Dane Everitt
9c303456fb Update codebase to L5.4 (#367) 2017-04-01 17:59:43 -04:00
Dane Everitt
0312c974f5
Update doc blocks for all app/ 2017-03-19 19:36:50 -04:00
Dane Everitt
1c85b1fbc4
Fix exception handler misnamed variable 2017-01-15 13:53:08 -05:00
Dane Everitt
f292080483
Should close #244
What a peculiar bug. Also modifies code to try and return the correct
status code, as well as return JSON based errors on any request that
Laravel thinks should have a JSON based response.
2017-01-12 13:44:23 -05:00
Dane Everitt
c1fb0a665f Apply fixes from StyleCI 2016-12-07 22:46:38 +00:00
Dane Everitt
33ca221b99 Fix typo in exception handler 2016-09-07 18:25:11 -04:00
Dane Everitt
228d6b1b21 Clean up exception handling code, closes #81
Makes sure things get logged properly.
2016-09-07 16:12:06 -04:00
Dane Everitt
afb5011fbe Update to Laravel 5.3
[BREAKING] — REMOVES REMOTE API

A new API will need to be implemented properly using the new Laravel
Passport OAuth2 system. DingoAPI was becoming too unstable and
development wasn’t really moving along enough to continue to rely on it.
2016-09-03 17:09:00 -04:00
Dane Everitt
76049c5860 Improved exception handler for AJAX requests 2016-02-08 18:03:05 -05:00