encode channel names
This commit is contained in:
parent
8144a9bb87
commit
b832f56929
2 changed files with 5 additions and 2 deletions
|
@ -288,10 +288,11 @@ function PublishForm(props: Props) {
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
if (signedMessage) {
|
if (signedMessage) {
|
||||||
|
const encodedChannelName = encodeURIComponent(channelName || '');
|
||||||
const newEndpointUrl =
|
const newEndpointUrl =
|
||||||
`${NEW_LIVESTREAM_REPLAY_API}?channel_claim_id=${channelId}` +
|
`${NEW_LIVESTREAM_REPLAY_API}?channel_claim_id=${channelId}` +
|
||||||
`&signature=${signedMessage.signature}&signature_ts=${signedMessage.signing_ts}&channel_name=${
|
`&signature=${signedMessage.signature}&signature_ts=${signedMessage.signing_ts}&channel_name=${
|
||||||
channelName || ''
|
encodedChannelName || ''
|
||||||
}`;
|
}`;
|
||||||
|
|
||||||
const responseFromNewApi = await fetch(newEndpointUrl);
|
const responseFromNewApi = await fetch(newEndpointUrl);
|
||||||
|
|
|
@ -183,8 +183,10 @@ export const killStream = async (channelId: string, channelName: string) => {
|
||||||
try {
|
try {
|
||||||
const streamData = await getStreamData(channelId, channelName);
|
const streamData = await getStreamData(channelId, channelName);
|
||||||
|
|
||||||
|
const encodedChannelName = encodeURIComponent(channelName);
|
||||||
|
|
||||||
const apiData = await fetch(
|
const apiData = await fetch(
|
||||||
`${LIVESTREAM_KILL}channel_claim_id=${channelId}&channel_name=${channelName}&signature_ts=${streamData.t}&signature=${streamData.s}`
|
`${LIVESTREAM_KILL}channel_claim_id=${channelId}&channel_name=${encodedChannelName}&signature_ts=${streamData.t}&signature=${streamData.s}`
|
||||||
);
|
);
|
||||||
|
|
||||||
const data = (await apiData.json()).data;
|
const data = (await apiData.json()).data;
|
||||||
|
|
Loading…
Reference in a new issue