Skip to content
This repository was archived by the owner on Apr 5, 2024. It is now read-only.

Commit 3443e58

Browse files
authored
Merge pull request #1250 from City-of-Helsinki/TILA-2698
TILA-2698 use csrf token in auth path
2 parents db97f64 + 0730b51 commit 3443e58

File tree

7 files changed

+81
-9
lines changed

7 files changed

+81
-9
lines changed

app/pages/user-reservations/__tests__/UserReservationsPage.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ describe('pages/user-reservations/UserReservationsPage', () => {
1111
search: '',
1212
},
1313
history: {
14-
push: () => {},
14+
push: () => { },
1515
},
1616
t: path => path,
1717
reduxReservations: {},
@@ -73,7 +73,7 @@ describe('pages/user-reservations/UserReservationsPage', () => {
7373
describe('tabs', () => {
7474
const findTabs = wrapper => wrapper.find('[role="tab"]');
7575
const findUpcomingTab = wrapper => findTabs(wrapper).at(0);
76-
const findPastTab = wrapper => findTabs(wrapper).at(1);
76+
// const findPastTab = wrapper => findTabs(wrapper).at(1);
7777

7878
test('should render upcoming and past tabs', () => {
7979
expect(findTabs(getWrapper()).length).toEqual(2);

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "varaamo",
3-
"version": "0.12.9",
3+
"version": "0.12.10",
44
"repository": {
55
"type": "git",
66
"url": "https://github.com/City-of-Helsinki/varaamo"

server/auth/configurePassport.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ function configurePassport() {
1111
clientSecret: settings.CLIENT_SECRET,
1212
callbackURL: settings.LOGIN_CALLBACK_URL,
1313
proxy: Boolean(settings.PROXY),
14+
state: true,
1415
},
1516
(accessToken, refreshToken, profile, cb) => {
1617
helsinkiStrategy.getAPIToken(accessToken, settings.TARGET_APP, (token) => {

src/domain/about/AboutPage.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,11 @@ import injectT from '../../../app/i18n/injectT';
99
import { getCurrentCustomization } from '../../../app/utils/customizationUtils';
1010

1111
function AboutPage({ t }) {
12-
const city = getCurrentCustomization() ? getCurrentCustomization().toLowerCase() : 'default';
1312
// TODO: Remove me along with getCurrentCustomization stuff.
13+
const city = getCurrentCustomization() ? getCurrentCustomization().toLowerCase() : 'default';
14+
15+
// eslint-disable-next-line max-len
16+
const registerLink = 'https://www.hel.fi/static/liitteet-2019/Kaupunginkanslia/Rekisteriselosteet/Kuva/Tilanvaraus-%20ja%20tietokantarekisteri,%20Varaamo%20ja%20Respa.pdf';
1417

1518
return (
1619
<PageWrapper className="about-page" title={t('AboutPage.title')}>
@@ -38,7 +41,7 @@ function AboutPage({ t }) {
3841
<h3>{t('AboutPageContent.customerRegisterHeader')}</h3>
3942
<p>
4043
{t('AboutPageContent.customerRegisterParagraph')}
41-
<a href="https://www.hel.fi/static/liitteet-2019/Kaupunginkanslia/Rekisteriselosteet/Kuva/Tilanvaraus-%20ja%20tietokantarekisteri,%20Varaamo%20ja%20Respa.pdf">
44+
<a href={registerLink}>
4245
{t('AboutPageContent.customerRegisterLink')}
4346
</a>
4447
</p>

src/domain/footer/__tests__/__snapshots__/Footer.test.js.snap

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ exports[`domain/footer/Footer When there is no customization in use renders corr
5656
<span
5757
className="app-varaamo-version"
5858
>
59-
v0.12.9
59+
v0.12.10
6060
</span>
6161
</div>
6262
</Col>
@@ -121,7 +121,7 @@ exports[`domain/footer/Footer renders correctly 1`] = `
121121
<span
122122
className="app-varaamo-version"
123123
>
124-
v0.12.9
124+
v0.12.10
125125
</span>
126126
</div>
127127
</Col>

src/domain/reservation/modal/__tests__/ReservationInfomationModal.test.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ describe('ReservationInformationModal', () => {
5353
});
5454

5555
describe('refund policy', () => {
56+
// eslint-disable-next-line max-len
5657
test('rendered when resource is not null, when user is admin, when reservation is not a staff event and when the reservation has a price', () => {
5758
const getRefundPolicy = (wrapper) => {
5859
return wrapper.find({ id: 'refund-policy' });

yarn.lock

Lines changed: 69 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3466,6 +3466,11 @@ [email protected]:
34663466
resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.3.1.tgz#e7e0a1f9ef43b4c8ba925c5c5a96e806d16873bb"
34673467
integrity sha1-5+Ch+e9DtMi6klxcWpboBtFoc7s=
34683468

3469+
3470+
version "0.4.0"
3471+
resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.4.0.tgz#beb437e7022b3b6d49019d088665303ebe9c14ba"
3472+
integrity sha512-+Hp8fLp57wnUSt0tY0tHEXh4voZRDnoIrZPqlo3DPiI4y9lwg/jqx+1Om94/W6ZaPDOUbnjOt/99w66zk+l1Xg==
3473+
34693474
34703475
version "0.7.3"
34713476
resolved "https://registry.yarnpkg.com/cookies/-/cookies-0.7.3.tgz#7912ce21fbf2e8c2da70cf1c3f351aecf59dadfa"
@@ -3608,6 +3613,15 @@ crypto-browserify@^3.11.0:
36083613
randombytes "^2.0.0"
36093614
randomfill "^1.0.3"
36103615

3616+
3617+
version "3.1.0"
3618+
resolved "https://registry.yarnpkg.com/csrf/-/csrf-3.1.0.tgz#ec75e9656d004d674b8ef5ba47b41fbfd6cb9c30"
3619+
integrity sha512-uTqEnCvWRk042asU6JtapDTcJeeailFy4ydOQS28bj1hcLnYRiqi8SsD2jS412AY1I/4qdOwWZun774iqywf9w==
3620+
dependencies:
3621+
rndm "1.2.0"
3622+
tsscmp "1.0.6"
3623+
uid-safe "2.1.5"
3624+
36113625
css-animation@^1.3.2:
36123626
version "1.6.1"
36133627
resolved "https://registry.yarnpkg.com/css-animation/-/css-animation-1.6.1.tgz#162064a3b0d51f958b7ff37b3d6d4de18e17039e"
@@ -3685,6 +3699,16 @@ csstype@^2.5.7:
36853699
resolved "https://registry.yarnpkg.com/csstype/-/csstype-2.6.18.tgz#980a8b53085f34af313410af064f2bd241784218"
36863700
integrity sha512-RSU6Hyeg14am3Ah4VZEmeX8H7kLwEEirXe6aU2IPfKNvhXwTflK5HQRDNI0ypQXoqmm+QPyG2IaPuQE5zMwSIQ==
36873701

3702+
csurf@^1.11.0:
3703+
version "1.11.0"
3704+
resolved "https://registry.yarnpkg.com/csurf/-/csurf-1.11.0.tgz#ab0c3c6634634192bd3d6f4b861be20800eeb61a"
3705+
integrity sha512-UCtehyEExKTxgiu8UHdGvHj4tnpE/Qctue03Giq5gPgMQ9cg/ciod5blZQ5a4uCEenNQjxyGuzygLdKUmee/bQ==
3706+
dependencies:
3707+
cookie "0.4.0"
3708+
cookie-signature "1.0.6"
3709+
csrf "3.1.0"
3710+
http-errors "~1.7.3"
3711+
36883712
cyclist@^1.0.1:
36893713
version "1.0.1"
36903714
resolved "https://registry.yarnpkg.com/cyclist/-/cyclist-1.0.1.tgz#596e9698fd0c80e12038c2b82d6eb1b35b6224d9"
@@ -5422,6 +5446,17 @@ [email protected], http-errors@~1.6.2, http-errors@~1.6.3:
54225446
setprototypeof "1.1.0"
54235447
statuses ">= 1.4.0 < 2"
54245448

5449+
http-errors@~1.7.3:
5450+
version "1.7.3"
5451+
resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.7.3.tgz#6c619e4f9c60308c38519498c14fbb10aacebb06"
5452+
integrity sha512-ZTTX0MWrsQ2ZAhA1cejAwDLycFsd7I7nVtnkT3Ol0aqodaKW+0CTZDQ1uBv5whptCnc8e8HeRRJxRs0kmm/Qfw==
5453+
dependencies:
5454+
depd "~1.1.2"
5455+
inherits "2.0.4"
5456+
setprototypeof "1.1.1"
5457+
statuses ">= 1.5.0 < 2"
5458+
toidentifier "1.0.0"
5459+
54255460
http-parser-js@>=0.5.1:
54265461
version "0.5.3"
54275462
resolved "https://registry.yarnpkg.com/http-parser-js/-/http-parser-js-0.5.3.tgz#01d2709c79d41698bb01d4decc5e9da4e4a033d9"
@@ -5605,7 +5640,7 @@ inflight@^1.0.4:
56055640
once "^1.3.0"
56065641
wrappy "1"
56075642

5608-
inherits@2, inherits@^2.0.1, inherits@^2.0.3, inherits@^2.0.4, inherits@~2.0.1, inherits@~2.0.3:
5643+
inherits@2, inherits@2.0.4, inherits@^2.0.1, inherits@^2.0.3, inherits@^2.0.4, inherits@~2.0.1, inherits@~2.0.3:
56095644
version "2.0.4"
56105645
resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c"
56115646
integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==
@@ -8305,6 +8340,11 @@ [email protected]:
83058340
discontinuous-range "1.0.0"
83068341
ret "~0.1.10"
83078342

8343+
random-bytes@~1.0.0:
8344+
version "1.0.0"
8345+
resolved "https://registry.yarnpkg.com/random-bytes/-/random-bytes-1.0.0.tgz#4f68a1dc0ae58bd3fb95848c30324db75d64360b"
8346+
integrity sha512-iv7LhNVO047HzYR3InF6pUcUsPQiHTM1Qal51DcGSuZFBil1aBBWG5eHPNek7bvILMaYJ/8RU1e8w1AMdHmLQQ==
8347+
83088348
randombytes@^2.0.0, randombytes@^2.0.1, randombytes@^2.0.5, randombytes@^2.1.0:
83098349
version "2.1.0"
83108350
resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.1.0.tgz#df6f84372f0270dc65cdf6291349ab7a473d4f2a"
@@ -9154,6 +9194,11 @@ ripemd160@^2.0.0, ripemd160@^2.0.1:
91549194
hash-base "^3.0.0"
91559195
inherits "^2.0.1"
91569196

9197+
9198+
version "1.2.0"
9199+
resolved "https://registry.yarnpkg.com/rndm/-/rndm-1.2.0.tgz#f33fe9cfb52bbfd520aa18323bc65db110a1b76c"
9200+
integrity sha512-fJhQQI5tLrQvYIYFpOnFinzv9dwmR7hRnUz1XqP3OJ1jIweTNOd6aTO4jwQSgcBSFUB+/KHJxuGneime+FdzOw==
9201+
91579202
91589203
version "1.6.0"
91599204
resolved "https://registry.yarnpkg.com/rosie/-/rosie-1.6.0.tgz#bc0ef64cd401d00794450d5792c0276e226b6ab0"
@@ -9383,6 +9428,11 @@ [email protected]:
93839428
resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.1.0.tgz#d0bd85536887b6fe7c0d818cb962d9d91c54e656"
93849429
integrity sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ==
93859430

9431+
9432+
version "1.1.1"
9433+
resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.1.1.tgz#7e95acb24aa92f5885e0abef5ba131330d4ae683"
9434+
integrity sha512-JvdAWfbXeIGaZ9cILp38HntZSFSo3mWg6xGcJJsd+d4aRMOqauag1C63dJfDw7OaMYwEbHMOxEZ1lqVRYP2OAw==
9435+
93869436
sha.js@^2.4.0, sha.js@^2.4.8:
93879437
version "2.4.11"
93889438
resolved "https://registry.yarnpkg.com/sha.js/-/sha.js-2.4.11.tgz#37a5cf0b81ecbc6943de109ba2960d1b26584ae7"
@@ -9635,7 +9685,7 @@ static-extend@^0.1.1:
96359685
define-property "^0.2.5"
96369686
object-copy "^0.1.0"
96379687

9638-
"statuses@>= 1.4.0 < 2":
9688+
"statuses@>= 1.4.0 < 2", "statuses@>= 1.5.0 < 2":
96399689
version "1.5.0"
96409690
resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.5.0.tgz#161c7dac177659fd9811f43771fa99381478628c"
96419691
integrity sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=
@@ -10083,6 +10133,11 @@ to-space-case@^1.0.0:
1008310133
dependencies:
1008410134
to-no-case "^1.0.0"
1008510135

10136+
10137+
version "1.0.0"
10138+
resolved "https://registry.yarnpkg.com/toidentifier/-/toidentifier-1.0.0.tgz#7e1be3470f1e77948bc43d94a3c8f4d7752ba553"
10139+
integrity sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw==
10140+
1008610141
toposort@^1.0.0:
1008710142
version "1.0.7"
1008810143
resolved "https://registry.yarnpkg.com/toposort/-/toposort-1.0.7.tgz#2e68442d9f64ec720b8cc89e6443ac6caa950029"
@@ -10125,6 +10180,11 @@ tslib@^2.2.0:
1012510180
resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.3.1.tgz#e8a335add5ceae51aa261d32a490158ef042ef01"
1012610181
integrity sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==
1012710182

10183+
10184+
version "1.0.6"
10185+
resolved "https://registry.yarnpkg.com/tsscmp/-/tsscmp-1.0.6.tgz#85b99583ac3589ec4bfef825b5000aa911d605eb"
10186+
integrity sha512-LxhtAkPDTkVCMQjt2h6eBVY28KCjikZqZfMcC15YBeNjkgUpdCfBu5HoiOTDu86v6smE8yOjyEktJ8hlbANHQA==
10187+
1012810188
1012910189
version "0.0.0"
1013010190
resolved "https://registry.yarnpkg.com/tty-browserify/-/tty-browserify-0.0.0.tgz#a157ba402da24e9bf957f9aa69d524eed42901a6"
@@ -10178,6 +10238,13 @@ [email protected]:
1017810238
commander "~2.19.0"
1017910239
source-map "~0.6.1"
1018010240

10241+
10242+
version "2.1.5"
10243+
resolved "https://registry.yarnpkg.com/uid-safe/-/uid-safe-2.1.5.tgz#2b3d5c7240e8fc2e58f8aa269e5ee49c0857bd3a"
10244+
integrity sha512-KPHm4VL5dDXKz01UuEd88Df+KzynaohSL9fBh096KWAxSKZQDI2uBrVqtvRM4rwrIrRRKsdLNML/lnaaVSRioA==
10245+
dependencies:
10246+
random-bytes "~1.0.0"
10247+
1018110248
1018210249
version "0.0.4"
1018310250
resolved "https://registry.yarnpkg.com/uid2/-/uid2-0.0.4.tgz#033f3b1d5d32505f5ce5f888b9f3b667123c0a44"

0 commit comments

Comments
 (0)