Unsolved URI api/v3/users/136 gives Error 404 - user not existent


  • Hi all,

    System info:

    * Ubuntu     18.04.6 LTS
    * node       14.15.3
    * nodebb     1.19.0
    * npm        8.3.0
    

    I have a weird phenomenon.

    When I log in to the "Admin panel -> Manage -> Users" I see a certain user.
    Lets call him John Doe.
    When I mark this "User" and go to "Actions -> Delete User" I get an 404 Error for my URI.
    The same for
    api/v3/users/136
    api/v3/users/account

    Statuscode from "api/v3/users/136" is:

    {
        status: {
            code: "not-found",
            message: "User does not exist"
        },
        response: { }
    }
    

    And by the way, the user has not been deleted.

    So what can i do, to prevent this error?
    And how can I delete this user?

    "Settings -> API Access":
    A Master Token is present and httpS is off.

    Regards,
    tecy

  • NodeBB

    Is there an entry for that uid in the database? Check the key user:136 and check users:joindate for the value 136. On mongodb :

    db.objects.findOne({_key: "user:136"});
    db.objects.findOne({_key: "users:joindate", value: "136"});
    

  • Hey @baris

    thanks for the advice.

    Result is:

    > db.objects.findOne({_key: "user:136"});
    {
            "_id" : ObjectId("5af82062ad5173788d7841d8"),
            "_key" : "user:136",
            "username" : "**********",
            "userslug" : "**********",
            "email" : "**********",
            "joindate" : 1526210658941,
            "lastonline" : 1607610706017,
            "picture" : "",
            "fullname" : "**********",
            "location" : "",
            "birthday" : "**********",
            "uploadedpicture" : "",
            "profileviews" : 32,
            "postcount" : 1,
            "lastposttime" : 1526487797565,
            "status" : "online",
            "gdpr_consent" : 0,
            "acceptTos" : 0,
            "uid" : "136",
            "passwordExpiry" : 1621247179428,
            "password" : "**********",
            "groupTitle" : "[]",
            "aboutme" : "",
            "email:confirmed" : 1,
            "rss_token" : "e2325fb3-7142-4525-8ad8-0f2f731c7a9d",
            "banned:expire" : 0,
            "website" : "",
            "signature" : ""
    }
    
    > db.objects.findOne({_key: "users:joindate", value: "136"});
    null
    

    If you see the start "**********" there is real data behind, I just masked it, because of the EU GDPR.

    So the problem may be the "null" joindate?
    Regards,
    tecy

  • NodeBB

    Yeah it could be try adding uid 136 to users:joindate and try deleting it again.

    db.objects.insert({_key: "users:joindate", valua: "136", score: 1526210658941 });
    

  • Hi @baris

    I followed your advice. But still no success.
    I opened the Developer Tools in my browser before I deleted the user 136 in the forums backend
    and it still gives an error:
    /api/v3/users/136/account 404
    20220115_error_deleting_user.png

    Message sais "User does not exists" or similar ... I am in a german backend here 😉

    Seems to be a problem in or with jquery, in jquery.js. At least this is what the dev ools are telling ...
    20220115_error_deleting_user_2.png

    I even tried this from a directly connected line to the internet, no firewalls, no WAFs, no piHoles etc.
    to be sure that the traffice has not been altered in a certain way.
    Still the same behaviour as mentioned above.

    Unfortunately, I am not that kind of a "dev genius",
    so I am not able to investigate this specific error further.

    Anyone any ideas, advices, suggestions ... ? 🤔

  • NodeBB

    @baris said in URI api/v3/users/136 gives Error 404 - user not existent:

    db.objects.insert({_key: "users:joindate", valua: "136", score: 1526210658941 });

    There is a typo in my previous message should be

    db.objects.insert({_key: "users:joindate", value: "136", score: 1526210658941 });
    

Suggested Topics

| |