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

Avoid two leading slashes in the request to create a new file #22563

Merged
merged 3 commits into from
Sep 19, 2024

Conversation

aboktor
Copy link
Contributor

@aboktor aboktor commented Sep 18, 2024

Description

When using PFT+POP auth with ODSP, ODSP fails to validate the p field in the token when we have two leading slashes in the path. This is likely a bug in ODSP but it does result in cryptic 401 failure of the request.

Breaking Changes

None

Reviewer Guidance

None

@github-actions github-actions bot added area: driver Driver related issues area: odsp-driver base: main PRs targeted against main branch labels Sep 18, 2024
Copy link
Contributor

@AndreiZe AndreiZe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@msfluid-bot
Copy link
Collaborator

msfluid-bot commented Sep 18, 2024

@fluid-example/bundle-size-tests: +245 Bytes
Metric NameBaseline SizeCompare SizeSize Diff
aqueduct.js 460.43 KB 460.47 KB +35 Bytes
azureClient.js 559.03 KB 559.08 KB +49 Bytes
connectionState.js 680 Bytes 680 Bytes No change
containerRuntime.js 261.68 KB 261.69 KB +14 Bytes
fluidFramework.js 403.45 KB 403.47 KB +14 Bytes
loader.js 134.17 KB 134.19 KB +14 Bytes
map.js 42.43 KB 42.44 KB +7 Bytes
matrix.js 145.87 KB 145.88 KB +7 Bytes
odspClient.js 526.18 KB 526.23 KB +49 Bytes
odspDriver.js 97.8 KB 97.82 KB +21 Bytes
odspPrefetchSnapshot.js 42.76 KB 42.78 KB +14 Bytes
sharedString.js 162.83 KB 162.84 KB +7 Bytes
sharedTree.js 393.92 KB 393.92 KB +7 Bytes
Total Size 3.3 MB 3.3 MB +245 Bytes

Baseline commit: 0b17d50

Generated by 🚫 dangerJS against 8aef7e1

@tylerbutler
Copy link
Member

@aboktor please make sure you get review and approval from someone on the framework team before merge.

Copy link
Contributor

@vladsud vladsud left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Worth double-checking if such check should be done a bit earlier in the stack, i.e. is it the only place that is affected?

@aboktor
Copy link
Contributor Author

aboktor commented Sep 19, 2024

Worth double-checking if such check should be done a bit earlier in the stack, i.e. is it the only place that is affected?

I considered that and decided against it. The safest is to make the change exactly where the leading '/' is being added (which is what I did in this PR).
The easiest thing to do is to remove the leading slash here and rely on callers to set the right path, but then that would be a breaking change.

@vladsud vladsud merged commit a0b1e50 into microsoft:main Sep 19, 2024
30 checks passed
sonalideshpandemsft pushed a commit that referenced this pull request Sep 23, 2024
When using PFT+POP auth with ODSP, ODSP fails to validate the `p` field in the token when we have two leading slashes in the path. This is likely a bug in ODSP but it does result in cryptic 401 failure of the request.
sonalideshpandemsft pushed a commit that referenced this pull request Sep 23, 2024
When using PFT+POP auth with ODSP, ODSP fails to validate the `p` field in the token when we have two leading slashes in the path. This is likely a bug in ODSP but it does result in cryptic 401 failure of the request.
sonalideshpandemsft pushed a commit that referenced this pull request Sep 23, 2024
When using PFT+POP auth with ODSP, ODSP fails to validate the `p` field in the token when we have two leading slashes in the path. This is likely a bug in ODSP but it does result in cryptic 401 failure of the request.
sonalideshpandemsft pushed a commit that referenced this pull request Sep 23, 2024
When using PFT+POP auth with ODSP, ODSP fails to validate the `p` field in the token when we have two leading slashes in the path. This is likely a bug in ODSP but it does result in cryptic 401 failure of the request.
sonalideshpandemsft added a commit that referenced this pull request Sep 23, 2024
frankmueller-msft pushed a commit that referenced this pull request Sep 23, 2024
frankmueller-msft pushed a commit that referenced this pull request Sep 23, 2024
frankmueller-msft pushed a commit that referenced this pull request Sep 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: driver Driver related issues area: odsp-driver base: main PRs targeted against main branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants