File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change 1616 "discord.js" : " ^14.14.1" ,
1717 "dotenv" : " ^16.4.5" ,
1818 "express" : " ^4.18.3" ,
19- "node-fetch" : " ^2.7.0"
19+ "node-fetch" : " ^2.7.0" ,
20+ "he" : " ^1.2.0"
2021 },
2122 "devDependencies" : {
2223 "nodemon" : " ^3.1.0"
Original file line number Diff line number Diff line change 11const express = require ( 'express' ) ;
22const fetch = require ( 'node-fetch' ) ;
33const cors = require ( 'cors' ) ;
4+ const he = require ( 'he' ) ;
45
56class AuthServer {
67 constructor ( discordBot ) {
@@ -93,7 +94,7 @@ class AuthServer {
9394 const errorData = Buffer . from ( JSON . stringify ( { error : message } ) ) . toString ( 'base64' ) ;
9495 return res . redirect ( `${ clientRedirectUri } ?error=${ errorData } ` ) ;
9596 } else {
96- return res . status ( 400 ) . send ( `Authentication error: ${ message } . Please close this window and try again.` ) ;
97+ return res . status ( 400 ) . send ( `Authentication error: ${ he . encode ( message ) } . Please close this window and try again.` ) ;
9798 }
9899 } ;
99100
You can’t perform that action at this time.
0 commit comments