Skip to content

Security issue: RtcTokenBuilder token's role can overridden by the client #83

@dlinah

Description

@dlinah

i have an project in agora with the app certificate enabled.
the problem is , if i set the role in the RtcTokenBuilder to RtcRole.SUBSCRIBER and then set it to "host" in AgoraRTC.createClient on the client , then the client we be able to publish video and audio like i host .
and vice versa if the token has the role of PUBLISHER, and the client has the role of "audience" it will throw an error when i try to publish video or audio.

 Uncaught (in promise) i {name: "AgoraRTCException", code: "INVALID_OPERATION", message: "AgoraRTCError INVALID_OPERATION: audience can not publish stream", data: undefined

it should be there other way around.

token server : "agora-access-token": "^2.0.4"
client : "agora-rtc-sdk-ng": "^0.1.9"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions