Skip to content

Commit 145e604

Browse files
authored
build: Release (#3014)
2 parents 791a727 + d77ed8d commit 145e604

31 files changed

+1202
-368
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,6 @@ test_logs
1717

1818
# visual studio code
1919
.vscode
20+
21+
# AI tools
22+
.claude

Parse-Dashboard/Authentication.js

Lines changed: 29 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -55,34 +55,53 @@ function initialize(app, options) {
5555

5656
const cookieSessionSecret = options.cookieSessionSecret || require('crypto').randomBytes(64).toString('hex');
5757
const cookieSessionMaxAge = options.cookieSessionMaxAge;
58-
app.use(require('connect-flash')());
58+
5959
app.use(require('body-parser').urlencoded({ extended: true }));
60-
app.use(require('cookie-session')({
61-
key : 'parse_dash',
62-
secret : cookieSessionSecret,
63-
maxAge : cookieSessionMaxAge
60+
app.use(require('express-session')({
61+
name: 'parse_dash',
62+
secret: cookieSessionSecret,
63+
resave: false,
64+
saveUninitialized: false,
65+
cookie: {
66+
maxAge: cookieSessionMaxAge,
67+
httpOnly: true,
68+
sameSite: 'lax',
69+
}
6470
}));
71+
app.use(require('connect-flash')());
6572
app.use(passport.initialize());
6673
app.use(passport.session());
6774

6875
app.post('/login',
6976
csrf(),
7077
(req,res,next) => {
7178
let redirect = 'apps';
79+
let originalRedirect = null;
7280
if (req.body.redirect) {
73-
redirect = req.body.redirect.charAt(0) === '/' ? req.body.redirect.substring(1) : req.body.redirect
81+
originalRedirect = req.body.redirect;
82+
// Validate redirect to prevent open redirect vulnerability
83+
if (originalRedirect.includes('://') || originalRedirect.startsWith('//')) {
84+
// Reject absolute URLs and protocol-relative URLs
85+
redirect = 'apps';
86+
originalRedirect = null;
87+
} else {
88+
// Strip leading slash from redirect to prevent double slashes
89+
redirect = originalRedirect.charAt(0) === '/' ? originalRedirect.substring(1) : originalRedirect;
90+
}
7491
}
7592
return passport.authenticate('local', {
7693
successRedirect: `${self.mountPath}${redirect}`,
77-
failureRedirect: `${self.mountPath}login${req.body.redirect ? `?redirect=${req.body.redirect}` : ''}`,
94+
failureRedirect: `${self.mountPath}login${originalRedirect ? `?redirect=${originalRedirect}` : ''}`,
7895
failureFlash : true
7996
})(req, res, next)
8097
},
8198
);
8299

83-
app.get('/logout', function(req, res){
84-
req.logout();
85-
res.redirect(`${self.mountPath}login`);
100+
app.get('/logout', function (req, res, next) {
101+
req.logout(function (err) {
102+
if (err) { return next(err); }
103+
res.redirect(`${self.mountPath}login`);
104+
});
86105
});
87106
}
88107

Parse-Dashboard/app.js

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1062,8 +1062,26 @@ You have direct access to the Parse database through function calls, so you can
10621062
}
10631063

10641064
app.get('/login', csrf(), function(req, res) {
1065-
const redirectURL = req.url.includes('?redirect=') && req.url.split('?redirect=')[1].length > 1 && req.url.split('?redirect=')[1];
1065+
let redirectURL = null;
1066+
try {
1067+
const url = new URL(req.url, 'http://localhost');
1068+
redirectURL = url.searchParams.get('redirect');
1069+
} catch (error) {
1070+
console.warn('Invalid URL in login redirect:', error.message);
1071+
}
10661072
if (!users || (req.user && req.user.isAuthenticated)) {
1073+
// Validate and sanitize redirect URL to prevent open redirect vulnerability
1074+
if (redirectURL) {
1075+
// Reject absolute URLs and protocol-relative URLs
1076+
if (redirectURL.includes('://') || redirectURL.startsWith('//')) {
1077+
redirectURL = null;
1078+
} else {
1079+
// Strip leading slash to prevent double slashes
1080+
if (redirectURL.charAt(0) === '/') {
1081+
redirectURL = redirectURL.substring(1);
1082+
}
1083+
}
1084+
}
10671085
return res.redirect(`${mountPath}${redirectURL || 'apps'}`);
10681086
}
10691087

README.md

Lines changed: 141 additions & 34 deletions
Large diffs are not rendered by default.

changelogs/CHANGELOG_alpha.md

Lines changed: 138 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,141 @@
1+
# [8.0.0-alpha.6](https://github.com/parse-community/parse-dashboard/compare/8.0.0-alpha.5...8.0.0-alpha.6) (2025-10-29)
2+
3+
4+
### Bug Fixes
5+
6+
* Session management issue that causes malformed redirect URLs ([#3011](https://github.com/parse-community/parse-dashboard/issues/3011)) ([1649dd3](https://github.com/parse-community/parse-dashboard/commit/1649dd31129d9dc7153ffa116f57fbec216142f6))
7+
8+
# [8.0.0-alpha.5](https://github.com/parse-community/parse-dashboard/compare/8.0.0-alpha.4...8.0.0-alpha.5) (2025-10-29)
9+
10+
11+
### Bug Fixes
12+
13+
* Switching between browser tabs can cause illegible text color for config parameter value field ([#3010](https://github.com/parse-community/parse-dashboard/issues/3010)) ([77c5c67](https://github.com/parse-community/parse-dashboard/commit/77c5c67cfecedb20654eede3a167c65654e35b4a))
14+
15+
# [8.0.0-alpha.4](https://github.com/parse-community/parse-dashboard/compare/8.0.0-alpha.3...8.0.0-alpha.4) (2025-10-29)
16+
17+
18+
### Features
19+
20+
* Add info panel options `prefetchImage`, `prefetchVideo`, `prefetchAudio` to pre-fetch media content in the info panel ([#3009](https://github.com/parse-community/parse-dashboard/issues/3009)) ([6796c9e](https://github.com/parse-community/parse-dashboard/commit/6796c9e5f1fd0110100fb9814f55db4052ebb677))
21+
22+
# [8.0.0-alpha.3](https://github.com/parse-community/parse-dashboard/compare/8.0.0-alpha.2...8.0.0-alpha.3) (2025-10-29)
23+
24+
25+
### Bug Fixes
26+
27+
* Info panel briefly shows cached media content from previously selected cell when using pre-fetch ([#3008](https://github.com/parse-community/parse-dashboard/issues/3008)) ([dd6a85e](https://github.com/parse-community/parse-dashboard/commit/dd6a85e4734adda9bc9a92d7bdfba2e7a061dd83))
28+
29+
# [8.0.0-alpha.2](https://github.com/parse-community/parse-dashboard/compare/8.0.0-alpha.1...8.0.0-alpha.2) (2025-10-25)
30+
31+
32+
### Bug Fixes
33+
34+
* Cannot connect to server with error invalid header name ([#3006](https://github.com/parse-community/parse-dashboard/issues/3006)) ([ea4ec07](https://github.com/parse-community/parse-dashboard/commit/ea4ec071ae5d88f4cf6ba2c3b1da72509123b39c))
35+
36+
# [8.0.0-alpha.1](https://github.com/parse-community/parse-dashboard/compare/7.6.0-alpha.13...8.0.0-alpha.1) (2025-10-25)
37+
38+
39+
### Bug Fixes
40+
41+
* Add missing major version increase of dashboard release ([#3005](https://github.com/parse-community/parse-dashboard/issues/3005)) ([5debb4d](https://github.com/parse-community/parse-dashboard/commit/5debb4dc143e4eebcfabb3e25cc882b6ea3594e7))
42+
43+
44+
### BREAKING CHANGES
45+
46+
* This increases the required minimum version to Parse Server 7. ([5debb4d](5debb4d))
47+
48+
# [7.6.0-alpha.13](https://github.com/parse-community/parse-dashboard/compare/7.6.0-alpha.12...7.6.0-alpha.13) (2025-10-25)
49+
50+
51+
### Features
52+
53+
* Add Parse Server version compatibility detection ([#3004](https://github.com/parse-community/parse-dashboard/issues/3004)) ([9a7a60f](https://github.com/parse-community/parse-dashboard/commit/9a7a60fea3e76e66e5c6e5d39d3ad8fb02ba5e38))
54+
55+
# [7.6.0-alpha.12](https://github.com/parse-community/parse-dashboard/compare/7.6.0-alpha.11...7.6.0-alpha.12) (2025-10-22)
56+
57+
58+
### Bug Fixes
59+
60+
* Security upgrade parse from 3.5.1 to 7.0.1 ([#3003](https://github.com/parse-community/parse-dashboard/issues/3003)) ([5123fbf](https://github.com/parse-community/parse-dashboard/commit/5123fbf28f40d6a4e2e3030c2a0b810131397aea))
61+
62+
# [7.6.0-alpha.11](https://github.com/parse-community/parse-dashboard/compare/7.6.0-alpha.10...7.6.0-alpha.11) (2025-10-14)
63+
64+
65+
### Bug Fixes
66+
67+
* Currently displayed view reloads when editing and saving a different view ([#3002](https://github.com/parse-community/parse-dashboard/issues/3002)) ([794a35a](https://github.com/parse-community/parse-dashboard/commit/794a35ae265ed74f56634429d37e1b6826be3c45))
68+
69+
# [7.6.0-alpha.10](https://github.com/parse-community/parse-dashboard/compare/7.6.0-alpha.9...7.6.0-alpha.10) (2025-10-14)
70+
71+
72+
### Bug Fixes
73+
74+
* ESC key does not cancel editing in data browser cell ([#3001](https://github.com/parse-community/parse-dashboard/issues/3001)) ([d1d7241](https://github.com/parse-community/parse-dashboard/commit/d1d724169ae12489fb30eeca558e4cc926e4d851))
75+
76+
# [7.6.0-alpha.9](https://github.com/parse-community/parse-dashboard/compare/7.6.0-alpha.8...7.6.0-alpha.9) (2025-10-14)
77+
78+
79+
### Bug Fixes
80+
81+
* Security upgrade passport from 0.5.3 to 0.6.0 ([#3000](https://github.com/parse-community/parse-dashboard/issues/3000)) ([fbb5e6d](https://github.com/parse-community/parse-dashboard/commit/fbb5e6d9df5575519d414b98481afd96a4ae11d8))
82+
83+
# [7.6.0-alpha.8](https://github.com/parse-community/parse-dashboard/compare/7.6.0-alpha.7...7.6.0-alpha.8) (2025-10-05)
84+
85+
86+
### Performance Improvements
87+
88+
* Storing, deleting, modifying view in server storage now only affects the specific view instead of updating all views ([#2998](https://github.com/parse-community/parse-dashboard/issues/2998)) ([48cea3c](https://github.com/parse-community/parse-dashboard/commit/48cea3c06001fe74be2990bc65036b5111f943b2))
89+
90+
# [7.6.0-alpha.7](https://github.com/parse-community/parse-dashboard/compare/7.6.0-alpha.6...7.6.0-alpha.7) (2025-10-05)
91+
92+
93+
### Bug Fixes
94+
95+
* Dashboard config objects stored on server with public read / write access ([#2997](https://github.com/parse-community/parse-dashboard/issues/2997)) ([31a4639](https://github.com/parse-community/parse-dashboard/commit/31a4639bb44fa7223d669aa40580b2348420f522))
96+
97+
# [7.6.0-alpha.6](https://github.com/parse-community/parse-dashboard/compare/7.6.0-alpha.5...7.6.0-alpha.6) (2025-10-05)
98+
99+
100+
### Bug Fixes
101+
102+
* Storing view on server creates view key with hashed view name instead of UUID ([#2995](https://github.com/parse-community/parse-dashboard/issues/2995)) ([7cb65f3](https://github.com/parse-community/parse-dashboard/commit/7cb65f360a2cd7f57782dad408c606671e271c7d))
103+
104+
# [7.6.0-alpha.5](https://github.com/parse-community/parse-dashboard/compare/7.6.0-alpha.4...7.6.0-alpha.5) (2025-10-05)
105+
106+
107+
### Bug Fixes
108+
109+
* View table data may be retained when switching between views ([#2996](https://github.com/parse-community/parse-dashboard/issues/2996)) ([ddc91c9](https://github.com/parse-community/parse-dashboard/commit/ddc91c991f8ef6ea2695448cdb10edec71c8ad1a))
110+
111+
# [7.6.0-alpha.4](https://github.com/parse-community/parse-dashboard/compare/7.6.0-alpha.3...7.6.0-alpha.4) (2025-10-05)
112+
113+
114+
### Bug Fixes
115+
116+
* Missing alert when changing data browser browser data while rows are selected ([#2994](https://github.com/parse-community/parse-dashboard/issues/2994)) ([6cabaa3](https://github.com/parse-community/parse-dashboard/commit/6cabaa36a95b0059ebbcd7b90a744fa9d0a403af))
117+
118+
# [7.6.0-alpha.3](https://github.com/parse-community/parse-dashboard/compare/7.6.0-alpha.2...7.6.0-alpha.3) (2025-10-04)
119+
120+
121+
### Bug Fixes
122+
123+
* Filter text field in data browser partly looses focus when selecting in drop-down element by hitting enter key to apply filter ([#2993](https://github.com/parse-community/parse-dashboard/issues/2993)) ([f4c17c7](https://github.com/parse-community/parse-dashboard/commit/f4c17c7d9046d9296c7cd9cb99109cad8c8a0e5b))
124+
125+
# [7.6.0-alpha.2](https://github.com/parse-community/parse-dashboard/compare/7.6.0-alpha.1...7.6.0-alpha.2) (2025-10-04)
126+
127+
128+
### Bug Fixes
129+
130+
* Filter text field in data browser partly looses focus when hitting enter key to apply filter ([#2992](https://github.com/parse-community/parse-dashboard/issues/2992)) ([e3085b9](https://github.com/parse-community/parse-dashboard/commit/e3085b9f62af359c04ce74498eb2029bce85a5d1))
131+
132+
# [7.6.0-alpha.1](https://github.com/parse-community/parse-dashboard/compare/7.5.0...7.6.0-alpha.1) (2025-10-04)
133+
134+
135+
### Features
136+
137+
* Add `matches regex` filter to data browser replacing limited `string contains string` filter ([#2991](https://github.com/parse-community/parse-dashboard/issues/2991)) ([64a9f71](https://github.com/parse-community/parse-dashboard/commit/64a9f71bf89a818a7cf69573f652f554cac6a751))
138+
1139
# [7.5.0-alpha.2](https://github.com/parse-community/parse-dashboard/compare/7.5.0-alpha.1...7.5.0-alpha.2) (2025-09-11)
2140

3141

0 commit comments

Comments
 (0)