Commit Graph

175 Commits

Author SHA1 Message Date
Toby Zerner
5672819549
Use Illuminate Session component instead of Symfony
Symfony's component relies on PHP's native session functionality, which
is not ideal. It automatically sets its own cookie headers, resulting in
this issue: https://github.com/flarum/core/issues/1084#issuecomment-364569953

The Illuminate component is more powerful and has a simpler API for
extension with other drivers and such, and fits in nicely with other
components we use (the majority of which are from Illuminate).
2018-03-18 14:43:44 +01:00
Franz Liedke
9d30be1617
Update Stratigility, use http-interop middleware 2018-03-18 13:52:16 +01:00
Toby Zerner
160493e725 fire -> dispatch
As per Illuminate\Contracts\Events\Dispatcher
2018-02-10 12:09:35 +10:30
Toby Zerner
ed3e833181 Fix docblocks 2018-01-21 08:28:15 +10:30
Clark Winkelmann
d357364712 Rename method and attribute, and remove unnecessary attribute filtering 2018-01-11 23:05:26 +01:00
Clark Winkelmann
26449a64fe Merge remote-tracking branch 'upstream/master' into signup-fields-locking 2018-01-11 22:54:41 +01:00
Clark Winkelmann
f3e29ab801 Dispatch user events after password reset
Previously PasswordChanged was never sent
2018-01-09 03:44:06 +01:00
Clark Winkelmann
7ccb263926 Fix array_only usage 2018-01-02 00:27:13 +01:00
Clark Winkelmann
fa9d89d690 Prevent editing fields in sign up modal according to identification data 2018-01-02 00:13:33 +01:00
Toby Zerner
292fe06001 Re-add missing middleware 2018-01-01 10:45:26 +10:30
Toby Zerner
d807171c44 Fix URL generator usage 2017-12-29 21:29:04 +10:30
Toby Zerner
57a91c966d Fix view paths 2017-12-29 21:28:53 +10:30
Toby Zerner
8a6344cfcf Fix some class names, clean up imports 2017-12-27 16:17:25 +10:30
Toby Zerner
a0621e85bf Fix order of array_first arguments
As per https://laravel.com/docs/5.3/upgrade (under "Arrays")
2017-12-26 20:38:15 +10:30
Franz Liedke
56231d61be
Move garbage collection into middleware
This prevents garbage collection to randomly break the installer:
before installation, the models that are being accessed have no
database connection.

Now, the middleware is only mounted into the forum's middleware
stack. I want API requests to have stable performance, and the
forum middleware stack is only mounted when Flarum is installed.
2017-12-21 12:23:34 +01:00
Daniel Klabbers
2aba61668c - satisfying styleci
- cleared the merge conflict in the phpdoc
- changed some string class names to use ::class
2017-12-15 08:10:32 +01:00
Daniël Klabbers
f65e4dcba3
merges 5.5 and master into next-back 2017-12-14 01:00:16 +01:00
Franz Liedke
c6ce172caa
Apply suggestions from StyleCI 2017-12-13 23:08:35 +01:00
Toby Zerner
92de751154 Fix last commit 2017-11-29 22:22:14 +10:30
Toby Zerner
5b46ec801d Generate URL in the controller instead of the view 2017-11-29 22:20:06 +10:30
Daniël Klabbers
6280fb2498
reverting translator contract 2017-11-29 06:26:48 +01:00
Toby Zerner
ba769e0c7e Preserve return URL when confirming logout 2017-11-29 13:47:00 +10:30
Toby Zerner
b7c1cc5cef New design for error pages. closes #252 2017-11-29 13:03:55 +10:30
Toby Zerner
e8a4e5e0ef Add log out confirmation if CSRF token is invalid. fixes #1282 2017-11-29 13:03:16 +10:30
Toby Zerner
a065c8e6f5 Make URLs more verbose 2017-11-29 12:53:39 +10:30
Toby Zerner
9392e1bec3 New design for reset password view 2017-11-29 12:53:06 +10:30
Toby Zerner
479e44dd04 Restructure views
- Use Laravel's view namespacing rather than the full file path
- Organise views into directories
2017-11-29 12:51:24 +10:30
Daniel Klabbers
4d9e2335c7 pleasing the angry god Circle 2017-11-27 11:05:15 +01:00
Daniel Klabbers
642332ffe2 replaced the Symfony\Component\Translation\TranslationInterface with the Illuminate\Contracts\Translation\Translator, deprecating the Symfony version 2017-11-27 10:42:16 +01:00
Toby Zerner
40ebc13292 Only apply custom CSS and header HTML on forum, not admin 2017-10-25 13:40:57 +10:30
Toby Zerner
3b1f8771c4 No need to set a remember cookie if only logging in for session 2017-10-07 17:51:30 +10:30
Franz Liedke
4aad7c1040
Cleanup code, typehints and class references 2017-10-03 18:54:07 +02:00
Franz Liedke
69b517ea79
Get rid of Server classes for Admin, API and Forum
The various middleware can be registered in the service provider,
and the rest of the logic can all go through one single front
controller (index.php in flarum/flarum, and Flarum\Http\Server in
flarum/core).

This will also simplify the necessary server setup, as only one
rewrite rule remains.
2017-10-03 18:54:07 +02:00
Franz Liedke
b72407440d
Combine URL generator classes into one 2017-10-03 18:54:06 +02:00
Franz Liedke
78f3681fc1
Fix namespace orderings
(Thanks, StyleCI!)
2017-10-03 18:54:06 +02:00
Franz Liedke
5b0d0d9f0f
Move command classes to domain namespaces
They will probably be refactored away at a later stage (when we get
rid of the command bus). Until then, this lets us remove the
Flarum\Core namespace and actually feels quite clean.
2017-10-03 18:52:50 +02:00
Franz Liedke
4a13cd8088
Move another trait out of obsolete Flarum\Core namespace 2017-10-03 18:49:53 +02:00
Franz Liedke
9abc63aaac
Move events to Flarum\Extension\Event namespace 2017-10-03 18:47:23 +02:00
Franz Liedke
33e3d757c3
Flatten Flarum\Http namespace 2017-10-03 18:47:23 +02:00
Franz Liedke
551e76f296
Move events to Flarum\Settings\Event namespace 2017-10-03 18:47:23 +02:00
Franz Liedke
564ea8ff73
Extract new Flarum\User namespace 2017-10-03 18:47:23 +02:00
Franz Liedke
1f1b63363e
Rename controller file 2017-10-03 18:45:41 +02:00
Franz Liedke
927e4ca3ed
Restructure Flarum\Forum namespace 2017-10-03 18:45:40 +02:00
Franz Liedke
0be13d50bd
Create new Flarum\Frontend namespace
It replaces the old Http\WebApp namespace and swallows other namespaces
and files, such as Flarum\Asset.
2017-10-03 18:45:40 +02:00
epoxa
cbe4464178 Fix oauth controller wrong session method call (#1226) 2017-08-19 14:43:21 +09:30
Sajjad Hashemian
92b555a246 prevent unsafe redirect via logout controller 2017-03-04 14:51:21 +03:30
Franz Liedke
bbcc33b5b5
Turn a few setters/getters into public attributes
There were no type hints etc. going on, and we would have needed
the getters anyway.

See https://github.com/flarum/core/pull/1105#issuecomment-279310998.
2017-02-14 22:56:17 +01:00
Franz Liedke
b5b18dd436 Update to Zend Stratigility 1.3
* Fix dependency version constraint. (Reverts #1066.)
* Allow exceptions to be raised when dispatching middleware.
* Fix our error handler middleware (do not implement Stratigility's
  error handler interface, catch exceptions instead).

See https://docs.zendframework.com/zend-stratigility/migration/to-v2/.

Closes #1069.
2017-01-02 22:57:09 +01:00
Sajjad Hashemian
06c32b668d Remember checkbox (#1075)
* Add session option to Rememberer class

* Update session login function to allow send additional data

* Add Remember me checkbox

* Cleanup login modal
2016-11-29 18:02:12 +10:30
Toby Zerner
1031826a3d Apply fixes from StyleCI
[ci skip] [skip ci]
2016-11-29 05:03:53 +00:00