2
1
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2023-12-13 21:00:40 +01:00
Commit graph

632 commits

Author SHA1 Message Date
Fabien O'Carroll
aaaf473154 Installed @tryghost/members-api@0.7.7
no-issue

This ensures that the correct emails are sent regardless of the form and
allows us to pass a flag to disable sending emails to users that are nor
already members.
2019-10-06 21:22:58 +07:00
Fabien O'Carroll
cb431d758b Installed @tryghost/members-api@0.7.6
no-issue

This adds support for dynamic success and cancel urls for stripe checkout
2019-10-03 17:36:33 +07:00
Kevin Ansfield
36674c7584 Updated dependency @tryghost/url-utils to v0.6.0
no issue

- has refactored relativeToAbsolute utility
- has bugfixes for subdirectory handling and deduplication
- includes new utilities for transforming urls in markdown and mobiledoc
2019-10-02 13:06:50 +01:00
Fabien O'Carroll
8bb0f6631f Installed @tryghost/members-ssr@0.6.0
no-issue

This adds extra protection for weird cookies states when trying to get
identity tokens
2019-10-02 18:23:52 +07:00
Fabien O'Carroll
d4ffb0176b Installed @tryghost/members-api@0.7.5
no-issue

This adds extra stripe information to members, including last4 digits of card
2019-10-02 18:22:44 +07:00
Fabien O'Carroll
09daf832d9 Installed @tryghost/members-api@0.7.4
This includes fixes for the destory and update methods of members object
2019-10-02 15:26:40 +07:00
Fabien O'Carroll
7a59489643 Installed @tryghost/members-api@0.7.2
no-issue

This includes fixes to webhook generating and customer handling
Also includes an update to how we set the logger
2019-10-02 14:03:00 +07:00
Fabien O'Carroll
c18cf50654 Installed @tryghost/members-api@0.7.1
no-issue

This includes a bugfix when creating members and sending the email
2019-10-01 17:50:13 +07:00
Fabien O'Carroll
3507df8a7c Installed @tryghost/members-api@0.7.0
no-issue

This includes functionality that allows us to have multiple magic-link
email templates
2019-10-01 15:16:28 +07:00
Fabien O'Carroll
e2ec3e71ac Installed members-api@0.6.2 members-ssr@0.5.2
no-issue
2019-10-01 11:58:50 +07:00
Fabien O'Carroll
020b2f2159 Updated lockfile
no-issue
2019-10-01 11:45:37 +07:00
renovate[bot]
e34cd56152 Update dependency metascraper-image to v5.7.6 (#11118) 2019-09-30 23:20:42 +02:00
renovate[bot]
b9636b64b6 Update dependency image-size to v0.8.3 (#11149) 2019-09-30 23:17:18 +02:00
renovate[bot]
82fb7b5960 Update dependency metascraper-title to v5.7.6 (#11122) 2019-09-30 23:15:30 +02:00
renovate[bot]
9da9ce669d Update dependency metascraper-description to v5.7.6 (#11117) 2019-09-30 23:10:21 +02:00
renovate[bot]
f4c14e570d Update dependency metascraper-logo-favicon to v5.7.6 (#11120) 2019-09-30 23:09:36 +02:00
renovate[bot]
1f2b5b27dc Update dependency metascraper to v5.7.6 (#11115) 2019-09-30 22:59:25 +02:00
renovate[bot]
3f3972c019 Update dependency metascraper-url to v5.7.6 (#11123) 2019-09-30 22:57:25 +02:00
renovate[bot]
7da882499a Update dependency metascraper-logo to v5.7.6 (#11119) 2019-09-30 22:56:24 +02:00
renovate[bot]
80789ab8d0 Update dependency metascraper-publisher to v5.7.6 (#11121) 2019-09-30 22:56:04 +02:00
renovate[bot]
0f098ccc3e Update dependency metascraper-author to v5.7.6 (#11116) 2019-09-30 22:55:44 +02:00
renovate[bot]
42faad9ee7 Update dependency markdown-it-mark to v3 (#11127) 2019-09-30 22:51:31 +02:00
renovate[bot]
8631f4cfd2 Update dependency knex-migrator to v3.4.0 (#11170) 2019-09-30 22:46:43 +02:00
renovate[bot]
9be99df0e1 Update dependency probe-image-size to v5 (#11128) 2019-09-30 22:35:10 +02:00
renovate[bot]
b64b0f3532 Update dependency markdown-it to v10 (#11126) 2019-09-30 21:22:08 +02:00
renovate[bot]
044919356e Update dependency mocha to v6 (#11171) 2019-09-30 10:31:11 +02:00
Renovate Bot
4bba5438f1 Update dependency sharp to v0.23.1 2019-09-30 04:32:55 +00:00
Renovate Bot
8e31417c09 Update dependency csv-parser to v2.3.1 2019-09-30 03:33:21 +00:00
Renovate Bot
719a38358b Update dependency @tryghost/members-ssr to v0.5.1 2019-09-30 02:32:32 +00:00
Renovate Bot
e03a02f3ed Update dependency @tryghost/helpers to v1.1.11 2019-09-30 01:35:46 +00:00
Kevin Ansfield
56493bed1a Update dependency @tryghost/url-utils to 0.5.0
no issue

- fixes failing regression test where `htmlRelativeToAbsolute()` was throwing an error due to some invalid HTML in our test fixtures
2019-09-26 12:24:18 +01:00
Fabien O'Carroll
e53913930d Installed @tryghost/members-api@0.6.1
no-issue

This adds support for sending email when creating member
2019-09-26 17:32:32 +07:00
Fabien O'Carroll
0de68a0919 Installed @tryghost/members-api@0.6.0
no-issue

This contains updates to allow creating of members via a stripe webhook,
and includes the webhook handler. Also updates members-api to expose a
middleware object, rather than a router - so that routes can be mounted
at the endpoint of choice.
2019-09-26 11:35:44 +07:00
Kevin Ansfield
d69440bd4f
Update dependency @tryghost/url-utils to 0.4.0 (#11156)
no issue

- updates usage of `htmlRelativeToAbsolute` to avoid unnecessary duplication of "home" url fetching (the UrlUtils instance already has that information)
2019-09-25 12:35:59 +01:00
Kevin Ansfield
3eb11533bd Marked the client auth table drop migration as irreversible
no issue

- bumps `knex-migrator` so it supports irreversible migrations
- marks the `03-drop-client-auth` migration as irreversible because it destroys data that is not recoverable and is required for earlier versions of Ghost to function
2019-09-23 17:22:46 +01:00
Nazar Gargol
3712e6e01c Bumped gscan to 2.9.0 2019-09-23 16:48:21 +02:00
Renovate Bot
93e04b0a43 Update dependency @tryghost/members-api to v0.5.3 2019-09-23 03:25:09 +00:00
Renovate Bot
b89e3650f1
Update dependency nock to v11.3.5 2019-09-23 01:27:17 +00:00
Renovate Bot
d33fc8c8a6 Update dependency @tryghost/helpers to v1.1.10 2019-09-23 01:26:36 +00:00
Nazar Gargol
62343b09e2 💡Bumped gscan version to 2.9.0 2019-09-19 18:18:33 +02:00
Fabien O'Carroll
01fca3ec2c Installed @tryghost/members-ssr@0.5.0
no-issue

This includes changes that can be used to signin via a GET request
2019-09-17 11:05:06 +08:00
Naz Gargol
0bee38d586
💡Bumped gscan version to 2.8.0 (#11134)
no issue

- This version contains --canary flag and new rules that come with it
- The theme checks will be run against canary rules by default
2019-09-16 18:22:49 +02:00
Kevin Ansfield
378ebe62b1 Merge branch 'master' into v3 2019-09-16 09:32:10 +01:00
Renovate Bot
2f86894dff Update dependency knex to v0.19.4 2019-09-16 04:25:49 +00:00
Renovate Bot
21b9ba893a Update dependency image-size to v0.7.5 2019-09-16 03:26:55 +00:00
Renovate Bot
c82418153d
Update Test & linting packages 2019-09-16 00:28:05 +00:00
Fabien O'Carroll
8d4056a6ec Installed @tryghost/members-api@0.5.2
no-issue

This improves the logging of errors when sending magic link.
2019-09-15 11:53:29 +08:00
Kevin Ansfield
d645afb416 Removed all accesstokens and refreshtokens related code
no issue

- v0.1 is ☠️ so the access/refresh token based auth is no longer used
- removed all code related to the `accesstokens` and `refreshtokens` tables
- removed all `passport` related dependencies as it's no longer used
2019-09-12 15:45:27 +01:00
Kevin Ansfield
b46f9b1dc2 🔒 Fully separated front-end and admin app urls
no issue

- uses `vhost` in parent-app to properly split front-end and admin/api apps when a separate admin url is configured
2019-09-10 15:47:49 +01:00
renovate[bot]
c3eb5c291c Lock file maintenance (#11061) 2019-09-10 09:45:45 +01:00
renovate[bot]
74fab21eb5 Update dependency mobiledoc-dom-renderer to v0.7.0 (#10937) 2019-09-10 09:36:43 +01:00
renovate[bot]
aa22de4db8 Update dependency nock to v11 (#11093) 2019-09-10 09:13:26 +01:00
renovate[bot]
07448ce034 Update dependency sqlite3 to v4.1.0 (#11034) 2019-09-10 08:58:35 +01:00
renovate[bot]
68af109d8e Update dependency bookshelf-relations to v1.3.0 (#11065) 2019-09-10 08:57:56 +01:00
Kevin Ansfield
5be63958b9 Reverted dependency oembed-parser to 1.2.2
no issue

- 1.3.1 is breaking the oembed regression tests
2019-09-09 16:00:04 +01:00
renovate[bot]
5c8efd087e Update dependency @tryghost/html-to-mobiledoc to v0.6.0 (#11092) 2019-09-09 10:45:30 +01:00
renovate[bot]
fa0a399345 Update dependency oembed-parser to v1.3.1 (#10983) 2019-09-09 10:44:13 +01:00
Fabien O'Carroll
b8fc0d2bd1
Cached member data in ghost-members-ssr-cache cookie (#11096)
no-issue

* Installed @tryghost/members-ssr@0.4.0
  This now supports caching of the data returned by the members-api

* Renamed cookies set by members-ssr
  As discussed with @ErisDS I have prefixed these cookies with `ghost`
2019-09-09 17:39:46 +08:00
Renovate Bot
01f2f36547 Update dependency @tryghost/url-utils to v0.3.1 2019-09-09 02:34:18 +00:00
Renovate Bot
af021921e7 Update dependency @tryghost/helpers to v1.1.9 2019-09-09 01:28:16 +00:00
Fabien O'Carroll
f63577fa4f
Implemented stripe checkout handling for members
no-issue

* Installed members-api@0.5.0 members-ssr@0.3.1
* Supported multiple members-forms
* Used members canary api
* Added GET handler to /members/ssr for id token
The identity token will be used to ensure that a payment is linked to the correct member
* Added stripe.js to ghost_head when members enabled
* Added basic support for linking to stripe checkout
* Removed listener to title and icon settings changes
* Added stripe subscription config
2019-09-06 15:14:21 +08:00
Fabien O'Carroll
49672a1e4d Updated members service to use magic-link signin
no-issue
2019-09-05 11:14:50 +08:00
Fabien O'Carroll
ef78fe7bab Updated members-api@0.4.1 members-ssr@0.3.0
no-issue

These versions contain the necessary changes for magic link signin
2019-09-05 11:14:50 +08:00
Renovate Bot
b1c61e4e84 Update dependency knex to v0.19.3 2019-09-02 02:32:19 +00:00
Renovate Bot
9a9be2f55e Update dependency bookshelf-relations to v1.1.2 2019-09-02 01:31:35 +00:00
Rishabh Garg
c2aa62083c Added support for bookmark card (#11024)
requires https://github.com/TryGhost/Ghost-Admin/pull/1293

- updates `oembed` endpoint behaviour
  - if an oembed provider is not found then we use `metascraper` to populate a metadata object
  - when metadata is returned rather than an oembed response the payload will look like this:
    ```json
    {
        "url": "...",
        "type": "bookmark",
        "metadata": {
            "url": "...",
            "title": "...",
            "description": "...",
            "author": "...",
            "publisher": "...",
            "thumbnail": "...",
            "icon": "..."
        }
    }
    ```
- adds a `bookmark` card which generates output for the bookmark card:
  ```html
  <figure class="kg-card kg-bookmark-card">
    <a href="[URL]" class="kg-bookmark-container">
      <div class="kg-bookmark-content">
        <div class="kg-bookmark-title">[TITLE]</div>
        <div class="kg-bookmark-description">[DESCRIPTION]</div>
        <div class="kg-bookmark-metadata">
          <img src="[ICON]" class="kg-bookmark-icon">
          <span class="kg-bookmark-author">[AUTHOR]</span>
          <span class="kg-bookmark-publisher">[PUBLISHER]</span>
        </div>
      </div>
      <div class="kg-bookmark-thumbnail">
        <img src="[THUMBNAIL]">
      </div>
    </a>
  </figure>
  ```
  - if a particular bit of data does not exist then the associated html element will not be present
2019-08-27 15:01:02 +01:00
Renovate Bot
4d7164dce6 Update dependency markdown-it to v9.1.0 2019-08-27 10:45:40 +08:00
Renovate Bot
9ea2f5b445 Update dependency uuid to v3.3.3 2019-08-26 03:26:59 +00:00
Renovate Bot
35a74ecb29
Update dependency proxyquire to v2.1.3 2019-08-26 00:29:39 +00:00
Kevin Ansfield
d0fa149e0e Updated tests eslint config to use eslint-plugin-ghost@0.5.0
no issue
- bump eslint-plugin-ghost to v0.5.0
- update core/test eslint config to use "ghost:test" in place of custom ruleset
- apply automated eslint fixes
2019-08-19 13:38:35 +01:00
Kevin Ansfield
9c46ff154d Revert tmp dependency to v0.0.33
no issue
- renovate auto-upgraded to 0.1.0
- reverts to 0.0.33 to fix the tests
2019-08-19 11:08:27 +01:00
Renovate Bot
dc36012d11 Update dependency knex to v0.19.2 2019-08-19 03:33:02 +00:00
Renovate Bot
59c20ec578 Update dependency @tryghost/social-urls to v0.1.2 2019-08-19 02:48:09 +00:00
Renovate Bot
12fe76cf1d Update dependency @tryghost/html-to-mobiledoc to v0.5.1 2019-08-19 02:30:45 +00:00
Renovate Bot
a250afdfb2 Update dependency @tryghost/helpers to v1.1.8 2019-08-19 01:35:54 +00:00
Renovate Bot
a04ab771e4 Update Test & linting packages 2019-08-16 19:19:54 +00:00
Kevin Ansfield
61420ae67f
Updated @tryghost/url-utils to v0.3.0 (#11027)
refs https://github.com/TryGhost/Ghost/issues/10793

- fixes `urlUtils.htmlRelativeToAbsolute` mangling attribute quote styles and removing indentation
2019-08-16 00:26:24 +01:00
Fabien O'Carroll
24c8da58e4 Fixed local package issue for npm users (#11019)
closes #11018
2019-08-14 13:19:01 +05:30
Fabien O'Carroll
ef4fd4b8ef Added shared nql-map-key-values module
no-issue

This module was being shared between multiple parts of the codebase, the
core/shared directory is a stopgap before we move it out to mongo-utils.
2019-08-12 18:41:43 +08:00
Kevin Ansfield
4f3391cd04
Updated @tryghost/url-utils to v0.2.0 (#11004)
no issue

- updates `@tryghost/url-utils` following an internal refactor of the package
- renames `makeAbsoluteUrls` to `htmlRelativeToAbsolute` to better reflect what the function is doing
- renames `getBlogUrl` to `getSiteUrl`
- updates UrlUtils test stubbing util to work with a class
- fixes use of invalid port numbers in tests (max port number is 65535, any higher is an invalid URL that will error with some parsers)
2019-08-12 09:31:42 +01:00
Renovate Bot
e89a2074b8
Update dependency proxyquire to v2.1.2 2019-08-12 00:29:25 +00:00
Fabien O'Carroll
c713847718 Installed @nexes/nql@0.3.0 2019-08-09 14:39:01 +08:00
renovate[bot]
494e0d14a0 Update dependency archiver to v3.1.1 (#10981) 2019-08-06 16:16:08 +08:00
renovate[bot]
13b1a9e7ef Update dependency sharp to v0.23.0 (#10984) 2019-08-06 16:14:50 +08:00
Renovate Bot
ff4d3f9e61 Update dependency proxyquire to v2.1.1 2019-08-05 04:34:25 +00:00
Renovate Bot
75ba8b5c64 Update dependency knex-migrator to v3.3.3 2019-08-05 01:28:21 +00:00
Hannah Wolfe
75f6e9c0e3 Update dependency gscan to v2.7.0 2019-08-01 11:00:04 +01:00
Renovate Bot
daae3964cc Lock file maintenance 2019-08-01 11:57:31 +05:30
Renovate Bot
5766edd6a3 Update dependency semver to v6.3.0 2019-08-01 10:44:06 +05:30
Renovate Bot
2d7a34fcbd Update dependency amperize to v0.6.0 2019-08-01 10:43:41 +05:30
Renovate Bot
c7a873b80f Update dependency @tryghost/html-to-mobiledoc to v0.5.0 2019-08-01 10:43:15 +05:30
Renovate Bot
40d8cd332b Update dependency intl-messageformat to v5.4.3 2019-08-01 10:40:32 +05:30
Rish
86c670a942 Updated dependency @tryghost/url-utils to v0.1.4
refs #10870

- Reverts moment-timezone version in url-utils to 0.5.23 to fix moment format issue
2019-07-30 20:17:38 +05:30
Rish
ffbd749c8d Added resolution for moment-timezone version
refs #10870

- `moment-timezone` was bumped to `0.5.26` inadvertently as a result of bump to `url-utils` in 6cb0f800c8
- Added resolution makes sure we use `0.5.23` for `moment-timezone` till tests are updated to work with latest version
2019-07-30 18:36:26 +05:30
Renovate Bot
e6a99ec147 Update dependency simple-html-tokenizer to v0.5.8 2019-07-29 12:24:53 +00:00
Renovate Bot
4428822253 Update dependency knex to v0.19.1 2019-07-29 06:25:28 +00:00
Renovate Bot
264a185721 Update dependency intl-messageformat to v5.1.2 2019-07-29 05:25:57 +00:00
Renovate Bot
d663cd2c8a Update dependency gscan to v2.6.6 2019-07-29 04:27:19 +00:00
Renovate Bot
6cb0f800c8 Update dependency @tryghost/url-utils to v0.1.3 2019-07-29 03:26:26 +00:00
Renovate Bot
a4546409c2 Update dependency @tryghost/social-urls to v0.1.1 2019-07-29 02:27:21 +00:00
Renovate Bot
d5d89ce9e4 Update dependency @tryghost/helpers to v1.1.7 2019-07-29 01:27:14 +00:00
Renovate Bot
e774d7bdd3 Update dependency multer to v1.4.2 2019-07-23 10:41:43 +00:00
Renovate Bot
2b20ae8f78 Update dependency lodash to v4.17.15 2019-07-22 03:27:21 +00:00
Renovate Bot
a1ece81c55 Update dependency gscan to v2.6.4 2019-07-22 02:30:43 +00:00
Renovate Bot
876ef128a7 Update dependency archiver to v3.0.3 2019-07-22 01:28:19 +00:00
Fabien O'Carroll
078060abdc
Refactored members service logging and errors (#10919)
* Installed @tryghost/members-ssr@0.2.1

refs https://github.com/TryGhost/Members/issues/38

This updates allows for dynamic access of the membersApi, which will be
used in future when replacing the membersApi instance with a newly
configured one.

* Set the membersApiInstance logger to use common.logging

refs https://github.com/TryGhost/Members/issues/38

Passes the Ghost logger to the members api, so that we can keep an eye
on errors produced by the api.

* Refactored memberService use to always use getter

refs https://github.com/TryGhost/Members/issues/38

This will allow us to switch out the membersApi and the consumers of it
to have the updated reference by going through a getter.

* Installed @tryghost/members-api@0.3.0

refs https://github.com/TryGhost/Members/issues/38

Adds support for setting the logger

* Uninstalled stripe@7.0.0

refs https://github.com/TryGhost/Members/issues/38

The stripe module is now a dep of members-api, as it should be

* Updated members service to reconfigure settings

refs https://github.com/TryGhost/Members/issues/38

Previously we were unable to stop an invalidly configured members api
instance, now that we create a new instance, we can wait for the ready
or error event and only switch it out then.
2019-07-18 15:37:11 +08:00
Renovate Bot
c521b6632d Update dependency markdown-it to v9 2019-07-15 13:32:21 +01:00
Renovate Bot
033e58e4ac Update dependency knex to v0.19.0 2019-07-15 16:37:34 +08:00
Renovate Bot
6eefce3349 Update dependency brute-knex to v4 2019-07-15 16:13:14 +08:00
Renovate Bot
c7e30e9970 Update dependency intl-messageformat to v5 2019-07-15 14:27:05 +08:00
Renovate Bot
a926adfd6c Update dependency probe-image-size to v4.1.1 2019-07-15 14:26:19 +08:00
Renovate Bot
e497486e78 Update dependency intl-messageformat to v4.4.0 2019-07-15 14:17:04 +08:00
Renovate Bot
07215bd040 Update dependency probe-image-size to v4.0.1 2019-07-15 05:24:55 +00:00
Renovate Bot
848640eda2 Update dependency mock-knex to v0.4.6 2019-07-15 04:25:22 +00:00
Renovate Bot
79b2cb7294 Update dependency markdown-it-footnote to v3.0.2 2019-07-15 03:25:21 +00:00
Renovate Bot
0e29b57ab3 Update dependency lodash to v4.17.14 2019-07-15 02:25:23 +00:00
Renovate Bot
6d3cd93107 Update dependency gscan to v2.6.3 2019-07-15 01:54:27 +00:00
Renovate Bot
1b56892e33 Update dependency ajv to v6.10.2 2019-07-15 01:25:12 +00:00
Renovate Bot
c55f341632 Update dependency lodash to v4.17.13 [SECURITY] 2019-07-11 11:26:39 +00:00
Fabien O'Carroll
d9d8d91b6a
Fixed members auth pages flashing on open (#10889)
closes #10888

The real work for this was done in:
https://github.com/TryGhost/Members/pull/37

Installed @tryghost/members-auth-pages@1.1.0
Installed @tryghost/members-theme-bindings@0.2.3
2019-07-09 19:05:47 +08:00
Fabien O'Carroll
177411045a
Moved members static pages to members api URL (#10887)
* Installed @tryghost/members-api@0.2.0

refs #10886

This will allow us to mount one router rather than having a static and
api router.

* Added members v2 api directory

refs #10886

This brings the members api more inline with how the rest of the apis
work within Ghost.

* Mounted the members api app to the api route

closes #10886

This successfully mounts the api and the static pages to the
/api/v2/members/ URL.

* Installed @tryghost/members-auth-pages@1.0.0

refs #10886

This updates the auth pages to work correctly with the new mount point.

* Changed membersUrl in members.js to use members api

refs #10886

This keeps the membersUrl lined up with the path for the static
members pages.

* Removed old members static mount point

refs #10886

These are no longer used, nor desired.

* Remove superfluous code from members service

refs #10886

This remove the gateway getter which is no longer used, and the fallback
for members not enabled - which is handled within the members app.

* Updated ssoOrigin to use admin url

refs #10886

This ensures that sites running on a separate admin domain have the
correct ssoOrigin, which is used to ensure only the designated auth
pages are used to hit the authentication endpoints.

Since the auth pages are now hosted under the `/ghost` url, they will be
on the admin origin and not the site origin
2019-07-09 19:02:44 +08:00
Renovate Bot
f2ef27243a Update dependency ajv to v6.10.1 2019-07-08 01:25:46 +00:00
Nazar Gargol
2048ea5cb2 Bumped eslint-plugin-ghost version to 0.4.0
no issue

- This version allows for async/await syntax to be used in the codebase which is available after dropping Node v6 support
2019-07-05 17:36:02 +02:00
renovate[bot]
db53ac0721 Update Test & linting packages (major) (#10858)
no issue 

- Updated Test & linting packages
- Updated use of hasOwnProperty
- Using Object.prototype.hasOwnProperty instead (ref. eslint.org/docs/rules/no-prototype-builtins)
- Removed already defined built-in global variable Intl
- Applied `--fix` with lint command on `core/test` folder
- The rules were broken because some of them were made stricter for `eslint: recommended` ruleset (ref. https://eslint.org/docs/user-guide/migrating-to-6.0.0#eslint-recommended-changes)
- Removed redundant global variable declarations to pass linting
2019-07-05 13:40:43 +02:00
Nazar Gargol
5aa0a2134b Reverted moment-timezone bump back to 0.5.23
refs #10870

- Added moment-timezone to Renovate's ignore list
- Described reasoning  in https://github.com/TryGhost/Ghost/issues/10870
2019-07-04 13:56:13 +02:00
renovate[bot]
1f32a1372f Update dependency got to v9 (#10861)
no issue 

- The underlying issue is the change in retry behavior in 'got' (a3e77de287)
- Now 500 responses trigger 2 default retries
- Renamed retries -> retry. As mentioned in https://github.com/sindresorhus/got/releases/v9.0.0
- Added response body error check
2019-07-04 10:36:51 +02:00
Renovate Bot
1225bd2fe9 Update dependency glob to v7 2019-07-04 10:18:12 +05:30
Renovate Bot
b508fd70ba Update dependency intl-messageformat to v4 2019-07-04 10:05:46 +05:30
Renovate Bot
a2473cbb42 Update dependency stripe to v7 2019-07-04 09:59:27 +05:30
Renovate Bot
cbaa7fde3b Update dependency fs-extra to v8 2019-07-02 19:10:12 +02:00
Renovate Bot
5bb732546f Update dependency knex-migrator to v3.3.2 2019-07-02 16:23:28 +02:00
Renovate Bot
052271272b Update dependency sqlite3 to v4.0.9 2019-07-02 11:39:33 +00:00
Renovate Bot
c214203015 Update dependency sanitize-html to v1.20.1 2019-07-02 13:36:49 +02:00
Renovate Bot
83ed38c2e0 Update dependency jsonpath to v1.0.2 2019-07-02 11:15:38 +00:00
Renovate Bot
4b7a1bffec Update dependency node-jose to v1.1.3 2019-07-02 10:31:28 +00:00
Renovate Bot
4753017d6a Update dependency moment-timezone to v0.5.25 2019-07-02 10:30:03 +00:00
Renovate Bot
c14849d761 Update dependency mock-knex to v0.4.5 2019-07-02 12:29:31 +02:00
Renovate Bot
b4a2305f64 Update dependency mobiledoc-dom-renderer to v0.6.6 2019-07-02 10:28:37 +00:00
Renovate Bot
90f0d38ad2 Update dependency mysql to v2.17.1 2019-07-02 12:26:23 +02:00
Renovate Bot
1371684b38 Update dependency connect-slashes to v1.4.0 2019-07-02 12:12:28 +02:00
Renovate Bot
f4dd1d173f Update dependency bson-objectid to v1.3.0 2019-07-02 12:10:29 +02:00
Renovate Bot
352fec4c00 Update dependency gscan to v2.6.2 2019-07-02 10:02:49 +00:00
Renovate Bot
62e0a17aa3 Update dependency image-size to v0.7.4 2019-07-02 11:54:36 +02:00
Renovate Bot
e146737aff Update dependency jsonwebtoken to v8.5.1 2019-07-02 11:47:22 +02:00
Renovate Bot
0ed0c49732 Update dependency grunt-contrib-compress to v1.5.0 2019-07-02 11:41:15 +02:00
Renovate Bot
189ce9bc1d Update dependency express-session to v1.16.2 2019-07-02 11:37:27 +02:00
Renovate Bot
5a316c3c80 Update dependency express to v4.17.1 2019-07-02 11:30:35 +02:00
Renovate Bot
a51008a034 Update dependency knex-migrator to v3.2.6 2019-07-02 09:27:54 +00:00
Renovate Bot
2dcb1a3776 Update dependency csv-parser to v2.3.0 2019-07-02 11:27:16 +02:00
Renovate Bot
9564757d8d Update dependency ajv to v6.10.0 2019-07-02 11:13:53 +02:00
Renovate Bot
0abc8971b4 Pin dependency grunt-contrib-symlink to 1.0.0 2019-07-02 11:08:33 +02:00
Renovate Bot
885ce6eb44 Update dependency cookie-session to v1.3.3 2019-07-02 11:04:52 +02:00
Renovate Bot
2e0067d877 Update dependency html-to-text to v5 2019-07-02 11:00:00 +02:00
Renovate Bot
d88a41628e Update dependency semver to v6 2019-07-02 10:56:03 +02:00
Renovate Bot
b3561dcee4 Update dependency sharp to v0.22.1 2019-07-02 10:52:46 +02:00
Renovate Bot
deeafe9734 Update dependency compression to v1.7.4 2019-07-02 08:26:50 +00:00
Renovate Bot
2cf40d2f6f Update dependency bson-objectid to v1.2.5 2019-07-02 07:30:13 +00:00
Renovate Bot
82d146577c Update dependency @tryghost/members-auth-pages to v0.2.2 2019-07-02 06:48:32 +00:00
Renovate Bot
7638ca4d77 Update dependency @tryghost/helpers to v1.1.6 2019-07-02 05:23:38 +00:00
Renovate Bot
2f7e6d21ae Update dependency bluebird to v3.5.5 2019-07-02 04:04:31 +00:00
Renovate Bot
c576a2d724 Update dependency @tryghost/members-api to v0.1.2 2019-07-02 03:29:16 +00:00
Renovate Bot
9da9b2f448 Update dependency @nexes/nql to v0.2.2 2019-07-02 02:31:50 +00:00
Renovate Bot
3eeb81a19c Update Build Tool 2019-07-02 01:31:27 +00:00
Kevin Ansfield
3229de75f8 Revert "Replaced keypair with rsa-keypair module (#10758)"
This reverts commit 64735693be.

- `rsa-keypair` is a binary dependency that was failing to install for a lot of users, reverting for now so we can look at alternative options for speeding up boot time
2019-06-26 14:00:25 +01:00
Fabien O'Carroll
da3f55dd9d Updated express-hbs to 2.1.2
no-issue

ronseal.
2019-06-25 16:19:33 +07:00
Fabien O'Carroll
bb1ee3c265 Updated members-theme-bindings & public/members.js
no-issue

This updates Ghost to inject the exact urls we want to use for both the
static members pages and the ssr endpoints we've configured for the
frontend. This allows us to changes these without having to update the
members repository, and gives a cleaner split between the two.
2019-06-25 15:13:52 +07:00
Nazar Gargol
e5391519eb Bumped js-yaml version to 3.13.1
no issue

- The 3.13.1 version contains security fixes described in b2f9e88239
2019-06-24 15:47:37 +02:00
Daniel Lockyer
64735693be Replaced keypair with rsa-keypair module (#10758)
refs #10789 

Speed up Ghost boot time by replacing the JS-only RSA key generator
library with a native alternative.
2019-06-21 16:51:44 +07:00
Naz Gargol
abda6e6338
Migrated to use url-utils from Ghost-SDK (#10787)
closes #10773

- The refactoring is a substitute for `urlService.utils` used previously throughout the codebase and now extracted into the separate module in Ghost-SDK
- Added url-utils stubbing utility for test suites
- Some tests had to be refactored to avoid double mocks (when url's are being reset inside of rested 'describe' groups)
2019-06-18 15:13:55 +02:00
Kevin Ansfield
bbae006eb5
Speed up image-size utility functions (#10784)
no issue

- add `probe-image-size` dependency
- use `probe-image-size` to fetch partial image data over the network where possible
2019-06-11 16:25:15 +01:00
Kevin Ansfield
6fd2db2ed4 Update amperize to v0.5.2
no issue
- includes a couple of bug fixes for fallback from probe-image-size to image-size
2019-06-11 12:17:28 +01:00
Kevin Ansfield
f34a9d2e36 Update amperize to v0.5.1
no issue

- includes fix for http->https conversion that broke tests in 90b0c8d3bb
2019-06-10 11:14:00 +01:00
Kevin Ansfield
90b0c8d3bb 🚀 Speed up initial generation of /amp/ content with many images
no issue

- update `amperize` to v0.5.0 which includes partial image loading and parallel network requests for fetching image dimensions
2019-06-10 09:53:25 +01:00
Nazar Gargol
f5544e7831 Migrated to use @tryghost/social-urls package
refs #10618

- /lib/social/urls was extracted into SDK to move more modules out of the core and reduce coupling of the theme layer
2019-06-06 17:10:13 +02:00
Kevin Ansfield
07e9490621
🐛 Fixed server crash when AMP posts contain images with unescaped chars (#10775)
no issue

- bump `amperize` to v0.4.0 which contains an updated version of `got` which does not crash on invalid image urls
2019-06-05 17:31:23 +01:00
Kevin Ansfield
525c2753ec Update dependency @tryghost/html-to-mobiledoc to v0.4.1
no issue

- includes a fix for text content potentially being lost when converting html to mobiledoc via the API
2019-06-03 12:34:35 +01:00
Nazar Gargol
bb7bb55cf3 Bumped gscan version to 2.6.0
no issue

- Updated valid theme fixture to be inline with warning that was added when using {{each}} helper instead of {{foreach}}
2019-05-08 16:56:22 +02:00
Fabien O'Carroll
c101fd90d7
Removed lib/members in favour of packages (#10739)
* Installed `@tryghost/members-{api,auth-pages}`

no-issue

* Used @tryghost/members-auth-pages in member service

no-issue

* Used @tryghost/members-api in members service

no-issue

* Deleted core/server/lib/members

no-issue

* Fixed parent app tests

no-issue

Requiring the members api (via the `gateway` getter) was throwing an
error, so we stub out the members service getters
2019-05-08 14:08:25 +02:00
Rish
a4f4a00cc4 Updated to use slugify method from SDK for safe string
refs #10618

- Updated lib safe string security method
2019-05-07 15:33:07 +05:30
Fabien O'Carroll
4563999352 🐛 Fixed password submission for private blogging
no-issue

This bump to members-ssr includes an update which no longer consumes the
request stream when calling getMemberDataFromSession. Previously, this
method was called on every request to the theme layer, and the
private-blogging middleware was unable to parse the body as the request
stream had already been consumed.
2019-05-06 12:38:38 +02:00
Kevin Ansfield
75ae3f8736 Added parsing of html cards when using ?source=html with the v2 Admin API
no issue

- when sending `html` with `?source=html` to the v2 Admin API it's now possible to include blocks of HTML that will be extracted to html cards rather than going through the normal lossy html-to-mobiledoc conversion

Example usage would be sending HTML in the following format:

```html
<p>Some standard content...</p>

<!--kg-card-begin: html-->
<div class="my-custom-html">...</div>
<!--kg-card-end: html-->

<p>Some more content...</p>
```

In this case an html card will be created in the mobiledoc with the content `<div class="my-custom-html">...</div>`.
2019-05-04 11:30:59 +01:00
Kevin Ansfield
9f9dde3107 Added caption and language extraction for code blocks when converting HTML via API
no issue
- update @tryghost/html-to-mobiledoc to v0.3.0
- uses updated @tryghost/kg-parser-plugins that is now shared with Ghost-Admin
2019-05-03 11:55:38 +01:00
Fabien O'Carroll
66f96d0a37 Updated yarn.lock
no-issue

There was a mismatch between exact version and caret version between
package.json and yarn.lock
2019-05-01 22:13:33 +02:00
Fabien O'Carroll
cade823ba7 🐛 Fixed postinstall script when running on Windows
no-issue

The previous postinstall script used the unix specific `cp` command,
which caused installing on Windows to break. This replaces it with an
npm module which handles copying files agnostic to platform.
2019-05-01 18:09:04 +02:00
Nazar Gargol
17cc70b94b Bumped bookshelf-relations version to 1.1.1 2019-04-30 17:11:40 +02:00
Fabien O'Carroll
5d02d1999c Installed @tryghost/members-theme-bindings@0.1.0
no-issue
2019-04-24 12:46:00 +02:00
Rish
4d0643fb49 🐛 Fixed crash in calculating reading time for empty posts
no issue

- Updated helpers package to fix `null` html cases in case of empty post content
2019-04-17 15:12:01 +05:30
Fabien O'Carroll
f9899cb8c4
Updated theme layer to use members-ssr (#10676)
* Removed support for cookies in members auth middleware

no-issue

The members middleware will no longer be supporting cookies, the cookie
will be handled by a new middleware specific for serverside rendering,
more informations can be found here:

https://paper.dropbox.com/doc/Members-Auth-II-4WP4vF6coMqDYbSMIajo5

* Removed members auth middleware from site app

no-issue

The site app no longer needs the members auth middleware as it doesn't
support cookies, and will be replaced by ssr specific middleware.

https://paper.dropbox.com/doc/Members-Auth-II-4WP4vF6coMqDYbSMIajo5

* Added comment for session_secret setting

no-issue

We are going to have multiple concepts of sessions, so adding a comment
here to be specific that this is for the Ghost Admin client

* Added theme_session_secret setting dynamic default

no-issue

Sessions for the theme layer will be signed, so we generate a random hex
string to use as a signing key

* Added getPublicConfig method

* Replaced export of httpHandler with POJO apiInstance

no-issue

This is mainly to reduce the public api, so it's easier to document.

* Renamed memberUserObject -> members

no-issue

Simplifies the interface, and is more inline with what we would want to export as an api library.

* Removed use of require options inside members

no-issue

This was too tight of a coupling between Ghost and Members

* Simplified apiInstance definition

no-issue

* Added getMember method to members api

* Added MembersSSR instance to members service

* Wired up routes for members ssr

* Updated members auth middleware to use getPublicConfig

* Removed publicKey static export from members service

* Used real session secret

no-issue

* Added DELETE /members/ssr handler

no-issue

This allows users to log out of the theme layer

* Fixed missing code property

no-issue

Ignition uses the statusCode property to forward status codes to call sites

* Removed superfluous error middleware

no-issue

Before we used generic JWT middleware which would reject, now the
middleware catches it's own error and doesn't error, thus this
middleware is unecessary.

* Removed console.logs

no-issue

* Updated token expirty to hardcoded 20 minutes

no-issue

This returns to our previous state of using short lived tokens, both for
security and simplicity.

* Removed hardcoded default member settings

no-issue

This is no longer needed, as defaults are in default-settings.json

* Removed stripe from default payment processor

no-issue

* Exported `getSiteUrl` method from url utils

no-issue

This keeps inline with newer naming conventions

* Updated how audience access control works

no-issue

Rather than being passed a function, members api now receives an object
which describes which origins have access to which audiences, and how
long those tokens should be allowed to work for. It also allows syntax
for default tokens where audience === origin requesting it. This can be
set to undefined or null to disable this functionality.

{
    "http://site.com": {
        "http://site.com": {
            tokenLength: '5m'
        },
        "http://othersite.com": {
            tokenLength: '1h'
        }
    },
    "*": {
        tokenLength: '30m'
    }
}

* Updated members service to use access control feature

no-issue

This also cleans up a lot of unecessary variable definitions, and some
other minor cleanups.

* Added status code to auth pages html response

no-issue

This was missing, probably default but better to be explicit

* Updated gateway to have membersApiUrl from config

no-issue

Previously we were parsing the url, this was not very safe as we can
have Ghost hosted on a subdomain, and this would have failed.

* Added issuer to public config for members

no-issue

This can be used to request SSR tokens in the client

* Fixed path for gateway bundle

no-issue

* Updated settings model tests

no-issue

* Revert "Removed stripe from default payment processor"

This reverts commit 1d88d9b6d73a10091070bcc1b7f5779d071c7845.

* Revert "Removed hardcoded default member settings"

This reverts commit 9d899048ba7d4b272b9ac65a95a52af66b30914a.

* Installed @tryghost/members-ssr

* Fixed tests for settings model
2019-04-16 16:50:25 +02:00
Rishabh Garg
62f5bdac4c
Updated to use count words/images helpers from SDK (#10686)
refs #10618

- Added @tryghost/helpers dependency to use Ghost-SDK helpers
- Updated countWords, countImages helpers and removed local copy
2019-04-16 08:00:01 +05:30
Fabien O'Carroll
5460de9c58 Updated gscan to 2.5.0
no-issue

This includes a bump to handlebars -> 4.1.2, which fixes a potential RCE
https://github.com/wycats/handlebars.js/blob/v4.1.2/release-notes.md#v412---april-13th-2019
2019-04-15 14:30:37 +02:00
Fabien O'Carroll
0f5ca616b8 Updated express-hbs to 1.1.1
no-issue

This includes a bump to handlebars -> 4.1.2, which fixes a potential RCE
https://github.com/wycats/handlebars.js/blob/v4.1.2/release-notes.md#v412---april-13th-2019
2019-04-15 14:30:37 +02:00
Fabien O'Carroll
3f52c404d4 Removed coverage tasks from Gruntfile
refs #9441
2019-04-08 18:23:35 +02:00
Fabien O'Carroll
c461c66b38 Added support for local template options
no-issue

This bumps express-hbs to 1.1.0 which includes the change for local
template options.

https://github.com/barc/express-hbs/releases/tag/v1.1.0
2019-04-03 11:31:20 +02:00
Nazar Gargol
7d6436f9bf Bumped gscan version to 2.4.0
no issue

- Updated theme fixtures to be in line with new deprecation rules
for {{lang}} and {{@blog.*}} helpers introduced with https://github.com/TryGhost/gscan/pull/180
2019-04-02 13:47:59 +08:00
Fabien O'Carroll
e99db0ee2d Revert "🐛 Fixed AMP output when there is a trailing '$'" (#10642)
This reverts commit 0c77033d51.

See https://github.com/TryGhost/Ghost/issues/10643 for an explanation.
2019-03-27 17:20:21 +00:00
Fabien O'Carroll
0c77033d51 🐛 Fixed AMP output when there is a trailing '$'
closes #9716

This was caused by a bug in express-hbs, which has more explanation
here:
https://github.com/TryGhost/Ghost/issues/9716#issuecomment-414863553
2019-03-26 12:19:30 +08:00
Nazar Gargol
b95547c3a2 Bumped ghost-ignition version to 3.0.4 2019-03-11 12:01:14 +08:00
Nazar Gargol
363d10cc29 Bumped ghost-ignition version to 3.0.3
no issue
2019-03-07 14:29:03 +08:00
Vikas Potluri
42c472feff Removed superagent dependency (#10535)
no issue

- Migrated default scheduling adapter to use Got via the request proxy
- SchedulingDefault is the only module that was using superagent so removed it as a dependency
2019-03-04 15:59:38 +08:00
Nazar Gargol
4db2eb7ce1 Bumped @tryghost/html-to-mobiledoc version
refs #10471
2019-02-25 10:25:56 +07:00
Nazar Gargol
f394eaa7b8 Added optional support for HTML source
closes TryGhost/Ghost-SDK/issues/51

- Due to JSDOM not supporting Node v6 the support for HTML conversion is now optional
2019-02-21 13:27:47 +07:00
Nazar Gargol
4e12b73c8a Bumped and pinned version for @tryghost/html-to-mobiledoc
no issue
2019-02-15 19:07:01 +00:00
Nazar Gargol
9020293e61 Added posibility to accept html as an input source for post
closes #10471

- Allows accepting HTML input for /posts endpoint when `?source=html` is
present in query parameter along with `html` in request payload
2019-02-15 18:58:46 +00:00
Fabien O'Carroll
bdd57b36cf
Moved grunt-eslint to npm script executing eslint (#10474)
refs #9441

* Updated top-level ids to use const
* Removed one layer of indentation
* Added .eslintignore files for server and test tasks
* Added npm scripts for eslint
* Fixed lint command in w/ grunt
* Uninstalled grunt-eslint
* Added eslint config
2019-02-11 13:26:06 +01:00
Nazar Gargol
6e0409d6db Bumped ghost-ignition version
no issue
2019-02-11 12:18:29 +00:00
Fabien O'Carroll
986c6d1f07
Removed minimist dev dependency (#10475)
refs #9441
2019-02-11 13:16:09 +01:00
Kevin Ansfield
aa1b9574ab Updated oembed providers list
no issue
- switch away from forked version of `oembed-parser` - our changes are merged upstream
- latest `oembed-parser` has a newer version of the providers list
2019-02-11 12:13:33 +00:00
Naz Gargol
19643c75dd
Added JSON Schema validation for /posts endpoint (#10468)
refs #10438

- Added  validation helper based on JSON schema
- Added schema validation for POST/PUT in /posts endpoints
- Refactored existing authors validation test suite
- Extended test coverage with a minimally required structure of post.add validator
2019-02-08 10:40:58 +00:00
kirrg001
6616cfe617 Fixed triggering bookshelf event twice
no issue

- bumped bookshelf-relations
- IMO this bug is not critical, because our event listeners should be protected to run twice
2019-02-07 22:10:12 +01:00
Kevin Ansfield
68d73d31b2 Bumped express-hbs dependency
no issue
- express-hbs has been updated to depend on handlebars@4.0.13 which protects against a potential RCE
- Ghost itself was not vulnerable to the RCE due to protection by gscan which does not allow themes using unknown helpers to be installed/activated
2019-02-07 14:16:37 +00:00
Fabien O'Carroll
46bf5270df
Added initial subscription support with stripe to Members API (#10460)
These changes introduce a new "service" to the members api, which handles getting and creating subscriptions.

This is wired up to get subscription information when creating tokens, and attaching information to the token, so that the Content API can allow/deny access. 

Behind the subscription service we have a Stripe "payment processor", this holds the logic for creating subscriptions etc... in Stripe.

The logic for getting items out of stripe uses a hash of the relevant data as the id to search for, this allows us to forgo keeping stripe data in a db, so that this feature can get out quicker.
2019-02-07 10:41:39 +01:00
Fabien O'Carroll
6dc47f2ff2 🐛 Fixed errors for missing sharp install
closes #10421
2019-02-05 10:14:05 +01:00
kirrg001
3289dc7619 Introduced model._changed
refs #9248

- Bookshelf gives access to ".changed" before the update
  - Discussion: https://github.com/bookshelf/bookshelf/issues/1943
- We also need to know what has changed after the update to be able to decide if we should trigger events
- Furthermore: Bookshelf cannot handle relation updates, it always marks relations as changed even though they did not change
- Bumped bookshelf-relations to be able to
  - know if relations were updated
  - ensure we unset relations on bookshelf's ".changed"
2019-02-03 13:02:26 +01:00
Fabien O'Carroll
12a265b500
🐛 Fixed error for missing sharp install (#10423)
closes #10421
refs #10181

This bumbs the ghost-ignition dep, so that the code passed to errors
takes priority over any code the error is inheriting from.
2019-01-28 12:37:27 +01:00
kirrg001
d017cf32a0 🐛 Fixed eslint installation error when using node version < 8.10 and < 6.14
closes #10420

- bumped brute-knex

> error eslint@5.12.1: The engine “node” is incompatible with this module. Expected version “^6.14.0 || ^8.10.0 || >=9.10.0”. Got “8.9.1”
2019-01-27 18:29:40 +01:00
kirrg001
baa8a6a1d4 Bumped moment to version 2.24.0
no issue
2019-01-22 09:12:43 +01:00
kirrg001
c862110cc4 Respected peer dependency for bookshelf
no issue

- need to use knex 0.14.x for now
- Bookshelf already bumped the peer dependency in master, but was not released yet
2019-01-22 09:12:43 +01:00
Katharina Irrgang
4acc375fb6
Bumped knex & bookshelf dependencies (#10404)
refs #9389, refs #9248

- https://github.com/bookshelf/bookshelf/releases/tag/0.14.0
- Bookshelf has fixed it's previous attr handling, see https://github.com/bookshelf/bookshelf/pull/1848
- SQlite3 double slashes was merged into knex and released 👻tgriesser/knex@c746dea
2019-01-21 21:53:11 +01:00
Katharina Irrgang
d0687da3a3
Bumped major test dependencies (#10403)
refs #9389

- eslint@5.12.1, eslint-plugin-ghost@0.1.0, grunt-contrib-clean@2.0.0, grunt-contrib-uglify@4.0.0, grunt-eslint@21.0.0, grunt-mocha-cli@4.0.0, grunt-shell@3.0.1, mocha@5.2
.0, nock@10.0.6, rewire@4.0.1

All of them dropped Node v4. I was not able to find any other big breaking changes, which affect us right now.
2019-01-21 18:28:44 +01:00
Katharina Irrgang
fb044e6d88
Bumped sinon from 4.4.6 to 7.3.2 (#10400)
refs #9389

- https://github.com/sinonjs/sinon/blob/master/CHANGELOG.md

Breaking changes for Ghost:

- no need to create a sandbox anymore, each file get's it's own sandbox
- just require sinon and use this sandbox
- you can still create separate sandboxes with .createSandbox
- reset single stubs: use .resetHistory instead of .reset

This is a global replace for any sandbox creation.

---

From https://sinonjs.org/releases/v7.2.3/sandbox/

> Default sandbox
> Since sinon@5.0.0, the sinon object is a default sandbox. Unless you have a very advanced setup or need a special configuration, you probably want to just use that one.
2019-01-21 17:53:44 +01:00
kirrg001
c20ff9afb8 Bumped superagent from 3.8.3 to 4.1.0
refs #9389

- https://github.com/visionmedia/superagent/blob/master/History.md#400-2018-11-17
- breaking changes don't really affect us
  - .end(…) returns undefined instead of the request. If you need the request object after calling .end() (and you probably don't), save it in a variable and call request.end(…). Consider not using .end() at all, and migrating to promises by calling .then() instead.
  - this could be changed, but it's not required
2019-01-21 15:19:07 +01:00
kirrg001
742aef77f2 Bumped html-to-text from 3.3.0 to 4.0.0
refs #9389

- https://github.com/werk85/node-html-to-text/blob/master/CHANGELOG.md#version-400
- breaking change does not affect us
2019-01-21 15:02:52 +01:00
kirrg001
1705e8575f Bumped csv-parser from 1.12.1 to 2.1.0
refs #9389

- breaking change does not affect use
- https://github.com/mafintosh/csv-parser/releases/tag/v2.0.0
2019-01-21 14:40:30 +01:00
kirrg001
eedf0dae02 Bumped chalk from version 1.1.3 to 2.4.2
refs #9389

- i was not able to find a breaking change, which affects us
- https://github.com/chalk/chalk/releases/tag/v2.0.0
2019-01-21 14:31:26 +01:00
kirrg001
8174a5cce7 Bumped archiver from version 1.3.0 to 3.0.0
refs #9389

- i wasn't able to find a breaking change which affect us
- https://github.com/archiverjs/node-archiver/blob/master/CHANGELOG.md
- we use it for downloading themes. this feature still works
2019-01-21 14:16:00 +01:00
kirrg001
7681199135 Bumped analytics-node from version 2.4.1 to 3.3.0
refs #9389

- breaking changes do not affect us
- https://github.com/segmentio/analytics-node/releases/tag/v3.0.0
2019-01-21 13:36:46 +01:00
kirrg001
f17d134759 Bumped dependencies
no issue
2019-01-21 13:33:20 +01:00
Fabien O'Carroll
1c56221d80 Added API Key auth middleware to v2 Admin API (#10006)
refs #9865

- Added `auth.authenticate.authenticateAdminApiKey` middleware
  - accepts signed JWT in an `Authorization: Ghost [token]` header
  - sets `req.api_key` if the token is valid
- Updated `authenticatePrivate` middleware stack for v2 admin routes
2019-01-18 12:45:06 +00:00
Hannah Wolfe
846a94728f
🐛 Fixed uncaught exceptions from image fetches
closes #10383

- Upgrades got to 8.3.2, which contains better error handling and resolves the issue with uncaught exceptions
- Note: Got 9.x stream doesn't support Node v6
- Requires us to hardcode http:// for xmlrpc because there is a breaking change where got now defaults to https instead of http
2019-01-15 20:35:46 +00:00
Katharina Irrgang
9d7c3bd726
🐛 Fixed all known filter limitations (#10159)
refs #10105, closes #10108, closes https://github.com/TryGhost/Ghost/issues/9950, refs https://github.com/TryGhost/Ghost/issues/9923, refs https://github.com/TryGhost/Ghost/issues/9916, refs https://github.com/TryGhost/Ghost/issues/9574, refs https://github.com/TryGhost/Ghost/issues/6345, refs https://github.com/TryGhost/Ghost/issues/6309, refs https://github.com/TryGhost/Ghost/issues/6158, refs https://github.com/TryGhost/GQL/issues/16

- removed GQL dependency
- replaced GQL with our brand new NQL implementation
- fixed all known filter limitations
- GQL suffered from some underlying filter bugs, which NQL tried to fix
- the bugs were mostly in how we query the database for relation filtering
- the underlying problem was caused by a too simple implementation of querying the relations
- mongo-knex has implemented a more robust and complex filtering mechanism for relations
- replaced logic in our bookshelf filter plugin
- we pass the custom, default and override filters from Ghost to NQL, which then are getting parsed and merged into a mongo JSON object. The mongo JSON is getting attached by mongo-knex.

NQL: https://github.com/NexesJS/NQL
mongo-knex: https://github.com/NexesJS/mongo-knex
2018-12-11 11:53:40 +01:00
Fabien O'Carroll
38c631eaf7 Installed deps required for members
refs #10213
2018-12-11 11:53:55 +07:00
Nazar Gargol
28a686a936 🐛 Fixed image optimisation for input image being smaller than optimized one
closes #10144

- When the input image is well optimized and has smaller byte size than the processed one it's still being used
- Bumped sharp version to have access to `size` property
2018-11-13 13:19:31 +01:00
kirrg001
fb3c375e74 Bumped knex-migrator to version 3.2.4
refs https://github.com/TryGhost/Ghost/issues/10155
2018-11-13 12:00:40 +01:00
Fabien O'Carroll
e0f31c67ba Installed jsonwebtoken@8.3.0 2018-11-08 13:32:09 +07:00
Katharina Irrgang
4bd211b42a Added Node v10 Support (#10058)
* Added Node v10 Support

no issue

Signed-off-by: kirrg001 <katharina.irrgang@googlemail.com>

* Bump amperize to version 0.3.8

no issue

* Bump mysql to version 2.16.0

no issue

- mysql 2.15.0 uses a deprecated notation for timers
- e.g. timers.unenroll()

* Bump sub dependencies

no issue

- e.g. knex-migrator used mysql 2.15.0

* Bump dependencies

no issue

* Replaced `new Buffer` with `Buffer.from`

no issue

- Buffer() is deprecated due to security and usability issues.
- https://nodejs.org/en/docs/guides/buffer-constructor-deprecation/
2018-10-30 15:45:51 +07:00
Katharina Irrgang
a7b0029471 Added mobiledoc revisions functionality
closes #9927

- Added post model implementation to be able to store up to 10 versions of mobiledoc
- Bumped GQL to support filtering on the mobiledoc revision table
- Added tests ensuring new functionality works
2018-10-09 15:31:09 +02:00
Katharina Irrgang
db1d2f62dd
Removed api integration tests (#9940)
refs #9866 

- moved the tests either to unit tests or routing tests
- or removed test case (a lot)
- this commit is very big 🤪, it was not rly possible to create clean commits for this
- it only changes the test env, no real code is touched

Next steps:
- optimise folder structure + make v2 testing possible
- reduce some more tests from routing and model integeration tests
2018-10-06 22:13:52 +02:00
Fabien O'Carroll
cb0c5dc582
Session auth service (#9910)
refs #9865

* This service handles the session store and exporting middleware to be
used for creating and managing sessions

* Updates the auth service index.js file in line with how we do things elsewhere

* After wrapping the exports in a getter, the usage of rewire had broken
the authenticate tests, this commit _removes_ rewire from the tests, calls `init` on
the models before the tests (needed because rewire isn't there) and also
cleans up the use of var.
2018-10-02 15:35:23 +07:00
Nazar Gargol
082dec7507 Bumped ghost-ignition to version 2.9.6 2018-09-25 11:41:37 +02:00
Nazar Gargol
57271127f4 Added v2 api endpoints (#9874)
refs #9866

- Registered Content API under /ghost/api/v2/content/
- Registered Admin API under /ghost/api/v2/admin/
- Moved API v0.1 implementation to web/api/v0.1
- Created web/api/v2 for the new api endpoints
- Started with reducing the implementation for the new Content API (the Content api does not serve admin api endpoints, that's why it was reducible)
- Covered parent-app module with basic test checking correct applications/routes are being mounted
- Added a readme file, which contains a warning using v2, because it's under active development!
- This PR does only make the new endpoints available, we have not:
  - optimised the web folder (e.g. res.isAdmin)
  - started with different API controllers
  - reason: we want to do more preparation tasks before we copy the api controllers
2018-09-18 15:59:06 +02:00
Kevin Ansfield
2eada22282 Bump forked oembed-parser dependency
no issue
- removes bellajs sub-dependency that wasn't pinned because it's latest version restricts the usable node version
2018-09-18 10:33:04 +01:00
Sumedh Nimkarde
efd1587ee9 Switched to eslint-plugin-ghost (#9835)
refs #9834

- @TODO: the test env eslint needs to use the plugin, not part of this PR
2018-09-17 20:49:30 +02:00
Nazar Gargol
b36490b6e7 Bump gscan to version 2.2.1
closes #9851
2018-09-06 12:24:17 +02:00
Fabien O'Carroll
c9b8ddde4b 🎨Added absolute_url flag to public api (#9833)
closes #9832

The API _should_ be returning absolute URLs for everything, 3rd party applications require absolute urls to read and display ghost data correctly. Currently they have to concat the blog url and the resource url, which is very uncomfortable.

Changing the public api like this would be considered a breaking change however so we've opted to put it behind a query parameter named `absolute_urls`.
2018-08-31 11:02:39 +01:00
Rish
5f49d9090a Update gscan version 2018-08-30 17:59:47 +01:00
Nazar Gargol
0faf89b5ab Added ability to resize and compress images on upload (#9837)
refs #4453

* On by default

* Added config to disable resizing

* Added basic image optimization processing

* Added dep: sharp (optional dep)

* Added resize middleware

* Take care of rotation based on EXIF information

* Removed all meta data from optimised image

* Added handling if sharp could not get installed

* Do not read ext twice - optimisation

* Do not call sharp if config is disabled

* Do not remove the original image which was uploaded (store 2 images)

* Support of `req.files` for internal logic

* Disabled cache to enable file removal on Windows
2018-08-30 17:30:36 +01:00
Katharina Irrgang
47e9eb48f7 Changed oembed-parser git link in package.json (#9806)
no issue
- git links require git to be installed which isn't likely on servers
- use tarball instead
2018-08-21 09:30:19 +01:00
Kevin Ansfield
c186347f0c
🐛 Koenig - Fixed Vimeo, Hulu, and Facebook Post embeds (#9803)
refs https://github.com/TryGhost/Ghost/issues/9786
- bumped `oembed-parser` dependency to a forked version
  - contains fix for oembed.com providers that include `{format}` in the `url`
  - contains updated `providers.json` file including the `Facebook (Post)` provider (thanks @lunaticmonk)
2018-08-20 11:52:40 +01:00
kirrg001
5d42767bfd Bump knex-migrator to version 3.2.3
no issue
2018-08-16 12:13:24 +02:00
kirrg001
59d9f1867d Bump gscan to version 2.0.0
no issue
2018-08-16 12:13:24 +02:00