Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent session extension in SystemJobsStore #3625

Merged
merged 3 commits into from Mar 17, 2017
Merged

Prevent session extension in SystemJobsStore #3625

merged 3 commits into from Mar 17, 2017

Conversation

@joschi
Copy link
Contributor

@joschi joschi commented Mar 16, 2017

Fixes #3587

@joschi joschi added this to the 2.3.0 milestone Mar 16, 2017
@joschi
Copy link
Contributor Author

@joschi joschi commented Mar 16, 2017

This has to be back-ported to the 2.2 branch once it has been reviewed and merged.

Copy link
Member

@edmundoa edmundoa left a comment

See the comment inline.

@@ -3,6 +3,7 @@ import Reflux from 'reflux';
import URLUtils from 'util/URLUtils';
import ApiRoutes from 'routing/ApiRoutes';
import fetch from 'logic/rest/FetchProvider';
import fetchPeriodically from 'logic/rest/FetchProvider';

This comment has been minimized.

@edmundoa

edmundoa Mar 16, 2017
Member

This is not doing what it should. It uses the default export from FetchProvider, which is the fetch function, so there is no difference with the original code, except that the function is locally using another name.
In order to fix the issue we should use a named import here import { fetchPeriodically }... to use the right function.

Copy link
Member

@edmundoa edmundoa left a comment

Still need a small change there, but almost good to go 🙂

@@ -2,7 +2,7 @@ import Reflux from 'reflux';

import URLUtils from 'util/URLUtils';
import ApiRoutes from 'routing/ApiRoutes';
import fetch from 'logic/rest/FetchProvider';
import {fetch, fetchPeriodically} from 'logic/rest/FetchProvider';

This comment has been minimized.

@edmundoa

edmundoa Mar 17, 2017
Member

In this case this is also not the recommended way of importing both functions (it breaks the import/named eslint rule). We should use this instead:
import fetch, { fetchPeriodically } from 'logic/rest/FetchProvider';

This comment has been minimized.

@joschi

joschi Mar 17, 2017
Author Contributor

WTF JavaScript…?!

This comment has been minimized.

@edmundoa

edmundoa Mar 17, 2017
Member

Copy link
Member

@edmundoa edmundoa left a comment

LGTM 👍

@edmundoa edmundoa merged commit 4ded9e7 into master Mar 17, 2017
4 checks passed
4 checks passed
@garybot2
ci-web-linter Jenkins build graylog-pr-linter-check 1465 has succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
licence/cla Contributor License Agreement is signed.
Details
@edmundoa edmundoa deleted the issue-3587 branch Mar 17, 2017
joschi added a commit that referenced this pull request Mar 17, 2017
* Prevent session extension in SystemJobsStore

Fixes #3587

* Use correct import statement

https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/import

* Something with import…

(cherry picked from commit 4ded9e7)
edmundoa added a commit that referenced this pull request Mar 17, 2017
* Prevent session extension in SystemJobsStore

Fixes #3587

* Use correct import statement

https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/import

* Something with import…

(cherry picked from commit 4ded9e7)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants