Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Commit

Permalink
Add v2.38.3
Browse files Browse the repository at this point in the history
  • Loading branch information
YannickRe committed Jan 29, 2021
1 parent 2f92a2a commit 8cc41d1
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
2 changes: 0 additions & 2 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,6 @@ stages:
ResourceGroupName: '$(ResourceGroup)'
SlotName: '$(SlotNameStaging)'
packageForLinux: '$(Pipeline.Workspace)\**\*.zip'
WebConfigParameters: '-Handler iisnode -NodeStartFile server.js -appType node'
enableCustomDeployment: true
DeploymentType: 'webDeploy'
ExcludeFilesFromAppDataFlag: false
Expand Down Expand Up @@ -301,7 +300,6 @@ stages:
ResourceGroupName: '$(ResourceGroup)'
SlotName: '$(SlotNameStaging)'
packageForLinux: '$(Pipeline.Workspace)\**\*.zip'
WebConfigParameters: '-Handler iisnode -NodeStartFile server.js -appType node'
enableCustomDeployment: true
DeploymentType: 'webDeploy'
ExcludeFilesFromAppDataFlag: false
Expand Down
11 changes: 7 additions & 4 deletions core/frontend/apps/private-blogging/lib/middleware.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
const fs = require('fs-extra');
const url = require('url');
const session = require('cookie-session');
const crypto = require('crypto');
const path = require('path');
Expand All @@ -22,10 +21,14 @@ function verifySessionHash(salt, hash) {
}

function getRedirectUrl(query) {
const redirect = decodeURIComponent(query.r || '/');

try {
return url.parse(redirect).pathname;
const redirect = decodeURIComponent(query.r || '/');
const pathname = new URL(redirect, config.get('url')).pathname;

const base = new URL(config.get('url'));
const target = new URL(pathname, config.get('url'));
// Make sure we don't redirect outside of the instance
return target.host === base.host ? pathname : '/';
} catch (e) {
return '/';
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ghost",
"version": "2.38.2",
"version": "2.38.3",
"description": "The professional publishing platform",
"author": "Ghost Foundation",
"homepage": "https://ghost.org",
Expand Down

0 comments on commit 8cc41d1

Please sign in to comment.