Skip to content

Commit

Permalink
feat(excessive data exposure): add user phone number on `/api/users/o…
Browse files Browse the repository at this point in the history
…ne/:email` (#295)
  • Loading branch information
tamirGer authored Dec 23, 2023
1 parent 037383e commit cae06a0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,4 +135,6 @@ Additionally, the endpoint PUT /api/users/one/{email}/photo accepts SVG images,

* **Broken Function Level Authorization** - The endpoint DELETE `/users/one/:id/photo?isAdmin=` can be used to delete any user's profile photo by enumerating the user IDs and setting the `isAdmin` query parameter to true, as there is no validation of it's value on the server side.

* **IFrame Injection** - The `/testimonials` page a URL parameter `videosrc` which directly controls the src attribute of the IFrame at the bottom of this page. Similarly, the home page takes a URL param `maptitle` which directly controls the `title` attribute of the IFrame at the CONTACT section of this page.
* **IFrame Injection** - The `/testimonials` page a URL parameter `videosrc` which directly controls the src attribute of the IFrame at the bottom of this page. Similarly, the home page takes a URL param `maptitle` which directly controls the `title` attribute of the IFrame at the CONTACT section of this page.

* **Excessive Data Exposure** - The `/api/users/one/:email` is supposed to expose only basic user information required to be displayed on the UI, but it also returns the user's phone number which is unnecessary information.
2 changes: 1 addition & 1 deletion src/users/api/UserDto.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export class UserDto {
@ApiProperty({ example: '4263982640269299' })
cardNumber: string;

@Expose({ groups: [FULL_USER_INFO] })
@Expose({ groups: [BASIC_USER_INFO, FULL_USER_INFO] })
@ApiProperty({ example: '12065550100' })
phoneNumber: string;

Expand Down

0 comments on commit cae06a0

Please sign in to comment.