Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
9669ca4
feat(microsoft-excel): add SharePoint drive support for Excel integra…
waleedlatif1 Apr 14, 2026
6162253
fix(microsoft-excel): address PR review comments
waleedlatif1 Apr 14, 2026
a3c93ee
fix(microsoft-excel): validate driveId in files route
waleedlatif1 Apr 14, 2026
780fa90
fix(microsoft-excel): unblock OneDrive users and validate driveId in …
waleedlatif1 Apr 14, 2026
f18af3c
fix(microsoft-excel): validate driveId in getItemBasePath utility
waleedlatif1 Apr 14, 2026
65308e4
fix(microsoft-excel): use centralized input validation
waleedlatif1 Apr 14, 2026
2884587
lint
waleedlatif1 Apr 14, 2026
649c3e6
improvement(microsoft-excel): add File Source dropdown to control Sha…
waleedlatif1 Apr 14, 2026
8b1c88c
fix(microsoft-excel): fix canonical param test failures
waleedlatif1 Apr 15, 2026
326114d
fix(microsoft-excel): address PR review feedback for SharePoint drive…
waleedlatif1 Apr 15, 2026
3be18ca
fix(microsoft-excel): use validateMicrosoftGraphId for driveId valida…
waleedlatif1 Apr 15, 2026
12231db
fix(microsoft-excel): use validatePathSegment with strict pattern for…
waleedlatif1 Apr 15, 2026
8148260
lint
waleedlatif1 Apr 15, 2026
16ad6ce
fix(microsoft-excel): reorder driveId before spreadsheetId in v1 block
waleedlatif1 Apr 15, 2026
d1b8778
fix(microsoft-excel): clear manualDriveId when fileSource changes
waleedlatif1 Apr 15, 2026
def6e90
refactor(microsoft-excel): use getItemBasePath in sheets route to rem…
waleedlatif1 Apr 15, 2026
5334c2b
lint
waleedlatif1 Apr 15, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix(microsoft-excel): validate driveId in files route
Add regex validation for driveId query param in the Microsoft OAuth
files route to prevent path traversal, matching the drives route.
  • Loading branch information
waleedlatif1 committed Apr 14, 2026
commit a3c93eeabad96bc0a143b0c4a50f0a4c62f031f8
3 changes: 3 additions & 0 deletions apps/sim/app/api/auth/oauth/microsoft/files/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,9 @@ export async function GET(request: NextRequest) {

// When driveId is provided (SharePoint), search within that specific drive.
// Otherwise, search the user's personal OneDrive.
if (driveId && !/^[\w-]+$/.test(driveId)) {
return NextResponse.json({ error: 'Invalid drive ID format' }, { status: 400 })
}
const drivePath = driveId ? `drives/${driveId}` : 'me/drive'

const response = await fetch(
Expand Down
Loading