yukieiji / ExtremeRoles

AmongUs Mod for Advanced User(+90 roles, +1300 options, and Cosmic addon)
GNU General Public License v3.0
59 stars 29 forks source link

Webチャット機能から左角括弧を送信すると、ルームから追い出される場合がある #347

Closed aoirint closed 8 months ago

aoirint commented 8 months ago

期待される動作 / Your Expectation

アジア公式サーバーのロビーで、Webチャット機能から左角括弧を含むチャットtest [を送信しようとした。

image

実際の動作 / The Reality

送信ボタンを押すと、自動的にルームから追い出されてしまった。

945360_20231223164932_1

ExR東京サーバーでは、ルームから追い出されることなく送信することができた。

945360_20231223173844_1

Among Us本体のチャット入力欄では、"$*+@[]_{|}~などの一部の記号が入力できない(タイプしてもテキストに追加されない)ようになっていますが、例に挙げたうち、左角括弧[が含まれていると、ルームから追い出されました。右角括弧]など他に例に挙げたものでは追い出されませんでした。

あなたの意見 / Your Proposal

Webチャット機能から左角括弧[を含むチャットを送信できないようにしてほしい。

バグ発生時のログやエラー / log when issue occur

ExtremeRolesDumpedLogs 2023-12-23T17-41-44.zip

Among Usバージョン/ Among Us Version

Among Us v2023.11.28s

Modバージョン / Mod Version

Extreme Roles v9.2.0.3

リージョン/Region

プレイヤー人数/Player Num

1

使用したオプション/Use Option

なし

yukieiji commented 8 months ago

よく見たらXion周りのエラーが出てますがシオンをオフにしたらどうなりますか?

aoirint commented 8 months ago

シオンをオフ

シオンをオフにしてからロビーを開き、[を送信しても、ルームから追い出されました。

XionのエラーはWebチャット機能ではなく、AmongUs本体のチャット入力欄で何も入力していない状態のままEnterキーを押すと出るようです。

スクリーンショット: この画面でEnter ![945360_20231223214335_1](https://github.com/yukieiji/ExtremeRoles/assets/27213639/8e0bd68c-d75a-429a-a547-5d4ad3c6f547)
[Error  :Il2CppInterop] During invoking native->managed trampoline
Exception: System.IndexOutOfRangeException: Index was outside the bounds of the array.
   at System.String.get_Chars(Int32 index)
   at ExtremeRoles.Roles.Solo.Host.Xion.ParseCommand(String chatStr) in D:\a\ExtremeRoles\ExtremeRoles\ExtremeRoles\Roles\Solo\Host\Xion.Command.cs:line 27
   at ExtremeRoles.Patches.Controller.ChatControllerSendChatPatch.Prefix(ChatController __instance) in D:\a\ExtremeRoles\ExtremeRoles\ExtremeRoles\Patches\Controller\ChatControllerPatch.cs:line 133
   at DMD<ChatController::SendChat>(ChatController this)
   at (il2cpp -> managed) SendChat(IntPtr , Il2CppMethodInfo* )

コマンドかどうか判定する部分に空文字列が来ていそうです。

https://github.com/yukieiji/ExtremeRoles/blob/27687709581e1db0a12f4c41f6f0bc1e24c3270b/ExtremeRoles/Roles/Solo/Host/Xion.Command.cs#L27