You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@james.apache.org by "chibenwa (via GitHub)" <gi...@apache.org> on 2024/01/22 10:14:28 UTC

[PR] JAMES-3909 Deleting userdata: Bypass user existence check [james-project]

chibenwa opened a new pull request, #1938:
URL: https://github.com/apache/james-project/pull/1938

   (no comment)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org


Re: [PR] JAMES-3909 Deleting userdata: Bypass user existence check [james-project]

Posted by "chibenwa (via GitHub)" <gi...@apache.org>.
chibenwa commented on code in PR #1938:
URL: https://github.com/apache/james-project/pull/1938#discussion_r1462879358


##########
server/protocols/webadmin/webadmin-data/src/main/java/org/apache/james/webadmin/routes/DeleteUserDataRoutes.java:
##########
@@ -73,7 +73,7 @@ public Route deleteUserData() {
             .register(DELETE_USER_DATA, request -> {
                 Username username = Username.of(request.params(USER_PATH_PARAM));
 
-                Preconditions.checkArgument(usersRepository.contains(username), "'username' parameter should be an existing user");
+                Preconditions.checkArgument(request.queryParams("force") != null || usersRepository.contains(username), "'username' parameter should be an existing user");

Review Comment:
   Why? `?force` is enough, IMO no need to add a dummy boolean value to it.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org


Re: [PR] JAMES-3909 Deleting userdata: Bypass user existence check [james-project]

Posted by "vttranlina (via GitHub)" <gi...@apache.org>.
vttranlina commented on code in PR #1938:
URL: https://github.com/apache/james-project/pull/1938#discussion_r1462722727


##########
server/protocols/webadmin/webadmin-data/src/main/java/org/apache/james/webadmin/routes/DeleteUserDataRoutes.java:
##########
@@ -73,7 +73,7 @@ public Route deleteUserData() {
             .register(DELETE_USER_DATA, request -> {
                 Username username = Username.of(request.params(USER_PATH_PARAM));
 
-                Preconditions.checkArgument(usersRepository.contains(username), "'username' parameter should be an existing user");
+                Preconditions.checkArgument(request.queryParams("force") != null || usersRepository.contains(username), "'username' parameter should be an existing user");

Review Comment:
   `force` = `true` is better?
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org


Re: [PR] JAMES-3909 Deleting userdata: Bypass user existence check [james-project]

Posted by "chibenwa (via GitHub)" <gi...@apache.org>.
chibenwa merged PR #1938:
URL: https://github.com/apache/james-project/pull/1938


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org


Re: [PR] JAMES-3909 Deleting userdata: Bypass user existence check [james-project]

Posted by "Arsnael (via GitHub)" <gi...@apache.org>.
Arsnael commented on PR #1938:
URL: https://github.com/apache/james-project/pull/1938#issuecomment-1905211640

   https://ci-builds.apache.org/job/james/job/ApacheJames/job/PR-1938/1/testReport/junit/org.apache.james.user.ldap/ReadOnlyUsersLDAPRepositoryTest$FilterTests/filterShouldKeepMatchingEntries/
   
   Related I think


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org