fineract-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rajuan <...@git.apache.org>
Subject [GitHub] incubator-fineract pull request: Secure Update password
Date Wed, 13 Apr 2016 07:22:41 GMT
Github user rajuan commented on a diff in the pull request:

    https://github.com/apache/incubator-fineract/pull/70#discussion_r59503297
  
    --- Diff: fineract-provider/src/main/java/org/apache/fineract/useradministration/api/UsersApiResource.java
---
    @@ -140,30 +148,45 @@ public String create(final String apiRequestBodyAsJson) {
             return this.toApiJsonSerializer.serialize(result);
         }
     
    -    @PUT
    -    @Path("{userId}")
    -    public String update(@PathParam("userId") final Long userId, final String apiRequestBodyAsJson)
{
    -
    -        final CommandWrapper commandRequest = new CommandWrapperBuilder() //
    -                .updateUser(userId) //
    -                .withJson(apiRequestBodyAsJson) //
    -                .build();
    -
    -        final CommandProcessingResult result = this.commandsSourceWritePlatformService.logCommandSource(commandRequest);
    -
    -        return this.toApiJsonSerializer.serialize(result);
    +  @PUT
    +  @Path("/{userId}/usrnme/{usrnme}/currentPass/{currentPass}")
    --- End diff --
    
    1. update API is used for all types of updates including firstname..... we cannot expect
that a firstname update by back office user would need him to know the password of the user.
This change cannot be accepted.
    2. If the expectation is that an existing user is trying to modify the password of their
own userId, then basic/oauth authentication itself would have validated the current password....
so no need to check again


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message