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

Fix/issue#1692 #1778

Merged
merged 21 commits into from
Apr 3, 2024
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
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
2 changes: 1 addition & 1 deletion lib/ldp.js
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ class LDP {
} else if (this.isAuxResource(slug, extension)) throw error(403, 'POST to auxiliary resources is not allowed')

if (slug.match(/\/|\||:/)) {
throw error(400, 'The name of new file POSTed may not contain : | or /')
throw error(400, 'The name of a POSTed new file may not contain ":" (colon), "|" (pipe), or "/" (slash)')
}
}

Expand Down
6 changes: 3 additions & 3 deletions test/integration/http-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -670,15 +670,15 @@ describe('HTTP APIs', function () {
.expect(201, done)
}
)
it('should return a 400 error when trying to put a container that contains a reserved suffix',
it('should return a 400 error when trying to PUT a container with a name that contains a reserved suffix',
function (done) {
server.put('/foo/bar.acl/test/')
.set('content-type', 'text/turtle')
.set('link', '<http://www.w3.org/ns/ldp#BasicContainer>; rel="type"')
.expect(400, done)
}
)
it('should return a 400 error when trying to put a resource that contains a reserved suffix',
it('should return a 400 error when trying to PUT a resource with a name that contains a reserved suffix',
function (done) {
server.put('/foo/bar.acl/test.ttl')
.send(putRequestBody)
Expand Down Expand Up @@ -1003,7 +1003,7 @@ describe('HTTP APIs', function () {
if (err) return done(err)
try {
postLocation = res.headers.location
assert(!postLocation.endsWith('.acl/') && !postLocation.endsWith('.meta/'), 'Container name should not end with .acl or .meta')
assert(!postLocation.endsWith('.acl/') && !postLocation.endsWith('.meta/'), 'Container name should not end with ".acl" or ".meta"')
zg009 marked this conversation as resolved.
Show resolved Hide resolved
} catch (err) {
return done(err)
}
Expand Down
Loading