mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-13 07:46:06 +00:00
Patch cypher injection vulnerability
@mattwr18 this patches the vulnerability. However we should never do string interpolation with user input.
This commit is contained in:
parent
7763083bd6
commit
4e687a06ea
@ -143,7 +143,7 @@ describe('users', () => {
|
|||||||
let deleteUserVariables
|
let deleteUserVariables
|
||||||
let asAuthor
|
let asAuthor
|
||||||
const deleteUserMutation = gql`
|
const deleteUserMutation = gql`
|
||||||
mutation($id: ID!, $resource: [String]) {
|
mutation($id: ID!, $resource: [Deletable]) {
|
||||||
DeleteUser(id: $id, resource: $resource) {
|
DeleteUser(id: $id, resource: $resource) {
|
||||||
id
|
id
|
||||||
contributions {
|
contributions {
|
||||||
|
|||||||
@ -40,7 +40,7 @@ type Mutation {
|
|||||||
follow(id: ID!, type: FollowTypeEnum): Boolean!
|
follow(id: ID!, type: FollowTypeEnum): Boolean!
|
||||||
# Unfollow the given Type and ID
|
# Unfollow the given Type and ID
|
||||||
unfollow(id: ID!, type: FollowTypeEnum): Boolean!
|
unfollow(id: ID!, type: FollowTypeEnum): Boolean!
|
||||||
DeleteUser(id: ID!, resource: [String]): User
|
DeleteUser(id: ID!, resource: [Deletable]): User
|
||||||
}
|
}
|
||||||
|
|
||||||
type Statistics {
|
type Statistics {
|
||||||
@ -92,6 +92,11 @@ type Report {
|
|||||||
user: User @relation(name: "REPORTED", direction: "OUT")
|
user: User @relation(name: "REPORTED", direction: "OUT")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
enum Deletable {
|
||||||
|
Post
|
||||||
|
Comment
|
||||||
|
}
|
||||||
|
|
||||||
enum ShoutTypeEnum {
|
enum ShoutTypeEnum {
|
||||||
Post
|
Post
|
||||||
Organization
|
Organization
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user