1
0
mirror of https://github.com/flarum/core.git synced 2025-07-24 10:11:43 +02:00
Commit Graph

66 Commits

Author SHA1 Message Date
Toby Zerner
63c355c20d Applied fixes from StyleCI 2016-02-25 22:09:39 -05:00
Franz Liedke
56956a84aa Use stored slug for generating server-rendered link to discussion
Fixes #646.
2016-02-04 11:47:03 +01:00
Toby Zerner
cda00550aa Rework sessions, remember cookies, and auth again
- Use Symfony's Session component to work with sessions, instead of a custom database model. Separate the concept of access tokens from sessions once again.
- Extract common session/remember cookie logic into SessionAuthenticator and Rememberer classes.
- Extract AuthenticateUserTrait into a new AuthenticationResponseFactory class.
- Fix forgot password process.
2015-12-05 15:11:25 +10:30
Toby Zerner
32e9c0587c Overhaul sessions, tokens, and authentication
- Use cookies + CSRF token for API authentication in the default client. This mitigates potential XSS attacks by making the token unavailable to JavaScript. The Authorization header is still supported, but not used by default.
- Make sensitive/destructive actions (editing a user, permanently deleting anything, visiting the admin CP) require the user to re-enter their password if they haven't entered it in the last 30 minutes.
- Refactor and clean up the authentication middleware.
- Add an `onhide` hook to the Modal component. (+1 squashed commit)
2015-12-03 15:11:57 +10:30
Toby Zerner
2e5bbdd34c Show loading indicator for admin client too 2015-11-04 11:51:25 +10:30
Toby Zerner
eed3755aa9 Display "Loading..." text while JS is loading 2015-11-02 16:47:36 +10:30
Toby Zerner
69f8acd0e0 Translate basic HTML views
app('view') call to set translator is temporary. See #189
2015-10-21 11:36:49 +10:30
Toby Zerner
a275e308fb Improve client boot failure error message/appearance 2015-10-21 09:59:22 +10:30
Toby Zerner
23eb4c805b Implement proper update process
If the version in the settings table mismatches the code version, then we return a 503 error for all requests coming through index.php and api.php, while admin.php serves up a form prompting for the database password which will run outstanding migrations.
2015-10-19 15:09:54 +10:30
Toby Zerner
c0bf875890 Make emails translatable
closes #267
2015-10-19 11:23:39 +10:30
Toby Zerner
127c54bc1c Add multiple UrlGenerator classes for forum/api/admin
Spent quite a while looking into the best solution here and ended up going with three separate classes. Thanks to @Luceos for the PR that got this rolling (#518). My reasoning is:

- The task of routing and URL generation is independent for each section of the app. Take Flarum\Api\Users\IndexAction for example. I don't want to generate a URL to a Flarum route... I specifically want to generate a URL to an API route. So there should be a class with that specific responsibility.
- In fact, each URL generator is slightly different, because we need to add a certain prefix to the start (e.g. /api)
- This also allows us to get rid of the "flarum.api" prefix on each route's name.
- It's still DRY, because they all extend a base class.

At the same time, I could see no reason this needed to be "interfaced", so all of the classes are concrete.

Goes a long way to fixing #123 - still just a few places left remaining with hardcoded URLs.
2015-10-02 17:35:29 +09:30
Franz Liedke
e91b370794 Fix last commit 2015-09-23 18:30:28 +02:00
Franz Liedke
9ecf79e385 Fix infinite redirect on some nojs pages. 2015-09-23 17:55:16 +02:00
Toby Zerner
3af9cd794d Don't catch JS error in debug mode 2015-09-23 10:52:26 +09:30
Daniel Klabbers
3c492f486a fixed flarum/core#489 missing meta description from admin area 2015-09-16 21:43:53 +02:00
Toby Zerner
c2f876b00b Prevent XML from being interpreted as PHP short tags 2015-09-14 18:12:36 +09:30
Toby Zerner
d549e26a4b Don't require database password confirmation 2015-09-04 21:45:52 +09:30
Franz Liedke
b30004a9d4 Web installer: Fix name of table prefix field 2015-09-04 12:14:48 +02:00
Franz Liedke
8d7e8ad7ca Reorder installer fields 2015-09-04 12:00:39 +02:00
Franz Liedke
4df26d7d5c Ask for password confirmation in web installer, too
Closes #405.
2015-09-04 12:00:03 +02:00
Franz Liedke
e4828f49a4 Be more consistent in case AJAX does not work 2015-08-31 22:37:04 +02:00
Franz Liedke
cb1ae3bdce Try to fix Safari bug during installation 2015-08-31 22:35:12 +02:00
Franz Liedke
75b8f1f13e Add field for table prefix in web installer
Related to #269.
2015-08-31 09:10:27 +02:00
Toby Zerner
5f9f42dc4b Installer: Prevent crash when views directory is not writable
Use plain PHP templates instead of Blade templates so there is nothing
that needs to be written.

closes #376
2015-08-31 14:25:16 +09:30
Huy Tran
8b5a346259 Make Google Web Font work on both HTTP and HTTPS 2015-08-27 20:17:42 -07:00
Toby Zerner
65901ce216 Check some requirements before installation 2015-08-27 20:11:06 +09:30
Toby Zerner
22182f3106 Update links and remove license file extension 2015-08-27 19:56:37 +09:30
Franz Liedke
85638f6669 Fix installer link to Flarum website 2015-08-27 11:37:49 +02:00
Toby Zerner
3490e8887b Use new discussion URL format 2015-08-25 19:52:24 +09:30
Toby Zerner
c3b8296e6f Fix installer issues 2015-08-17 14:32:38 +09:30
Toby Zerner
e8e818ac45 Implement web installer 2015-08-17 14:12:02 +09:30
Toby Zerner
6e087f7dc0 Don't redirect to HTML-only mode if in debug mode 2015-08-14 12:50:15 +09:30
Toby Zerner
6db682217a Prepend base URL to assets 2015-08-13 10:44:16 +09:30
Toby Zerner
6f4d7a36b6 Build very rough HTML-only content
And redirect to the "no JS" mode if the JS app crashes on boot.

ClientView/ClientAction is all a bit of a mess and will need to be
radically cleaned up at some point...
2015-08-06 12:21:11 +09:30
Toby Zerner
dfdfae7b6d Remove footer and move language selection to header 2015-08-06 12:16:55 +09:30
Toby Zerner
c067db09d1 Allow custom variables to be set on the client app 2015-07-31 20:08:27 +09:30
Toby Zerner
87a8e4a137 Use System.get instead of System.import
All of the modules we import should already be loaded, and we don't
want to ever attempt to import them anyway because we do not include a
Promise polyfill.
2015-07-29 21:08:24 +09:30
Toby Zerner
f3ef5a123c Get admin area working again 2015-07-29 20:58:22 +09:30
Toby Zerner
a9d4be8c0b Allow customisation of the client layout 2015-07-27 14:45:35 +09:30
Toby Zerner
d82da543b4 Use System.get instead of System.import
Means we get drop Promise polyfill
2015-07-27 14:16:39 +09:30
Toby Zerner
09540295ad Rework extension bootstrapping
System JS modules don't execute when they're registered, so we need to
import them explicitly. While we're at it, we may as well make the
locale bootstrapper a module too.
2015-07-20 18:08:28 +09:30
Toby Zerner
130aa6ce72 Throw error to console if app fails to boot 2015-07-17 17:43:51 +09:30
Toby Zerner
2aa9c2e746 Major CSS revamp
- Get rid of Bootstrap (except we still rely on some JS)
- Use BEM class names
- Rework variables/theme config
- Fix various bugs, including some on mobile

The CSS is still not ideal – it needs to be cleaned up some more. But
that can be a focus for after beta.
2015-07-17 14:47:49 +09:30
Toby Zerner
1c7653e79e Massive JavaScript cleanup
- Use JSX for templates
- Docblock/comment everything
- Mostly passes ESLint (still some work to do)
- Lots of renaming, refactoring, etc.

CSS hasn't been updated yet.
2015-07-15 14:01:11 +09:30
Toby Zerner
662a4dc54f Finish client action refactoring. closes flarum/core#126 2015-07-07 19:23:13 +09:30
Toby Zerner
23eec806e6 Initial refactor of client actions, data preloading, SEO
An initial stab at flarum/core#126. Still WIP. Preliminary
implementation of flarum/core#128 and flarum/core#13.
2015-07-07 15:29:21 +09:30
Franz Liedke
64e8a0abf3 Implement Android theme color support
As requested in the forums.
http://updates.html5rocks.com/2014/11/Support-for-theme-color-in-Chrome-39-for-Android
2015-06-26 23:11:13 +02:00
Toby Zerner
06a50e92aa Make home button route correctly, not respond on middle click
Amends flarum/core#140, closes flarum/core#136
2015-06-25 08:14:51 +09:30
Franz Liedke
0f577d28d5 Link to forum homepage in header bar.
Closes #140.
2015-06-24 22:21:44 +02:00
Toby Zerner
1f2e16c4bb Get login/forgot password working again 2015-06-19 11:19:49 +09:30