INNER CODE UNIT · Java

associateDogToMe

righettod/poc-graphql · src/main/java/eu/righettod/graphqlpoc/resolvers/Mutation.java:32

    public Dog associateDogToMe(String accessToken, int veterinaryId, int dogId) throws Exception {
        //[VULN]: There an access control issue here because the verification of the access token do not verify that the token belong to the veterinary passed in "veterinaryId"
        accessTokenManager.verifyToken(accessToken);
        return this.businessDataRepository.associatedDogToVeterinary(veterinaryId, dogId);
    }

    /**
     * Resolver linked to mutation "disassociateDogFromMe" defined in the schema.
     */
    public Dog disassociateDogFromMe(String accessToken, int veterinaryId, int dogId) throws Exception {
        //[VULN]: There an access control issue here because the verification of the access token do not verify that the token belong to the veterinary passed in "veterinaryId"
        accessTokenManager.verifyToken(accessToken);
        return this.businessDataRepository.disassociatedDogFromVeterinary(veterinaryId, dogId);
    }


}

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…