File tree Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -103,6 +103,7 @@ function startKafkaConsumer(handlers) {
103103 topicId,
104104 userEmail : helper . sanitizeEmail ( user . email ) ,
105105 } ;
106+ logger . debug ( 'body' , body ) ;
106107 logger . debug ( `body for generating token: ${ JSON . stringify ( body ) } ` ) ;
107108 logger . debug ( `authSecret: ${ config . authSecret . substring ( - 5 ) } ` ) ;
108109 const token = jwt . sign ( body , config . authSecret , { noTimestamp : true } ) . split ( '.' ) [ 2 ] ;
Original file line number Diff line number Diff line change @@ -49,7 +49,8 @@ function autoWrapExpress(obj) {
4949 */
5050function sanitizeEmail ( email ) {
5151 if ( email ) {
52- return email . substring ( 0 , email . indexOf ( '+' ) ) + email . substring ( email . indexOf ( '@' ) ) ;
52+ return email . substring ( 0 , email . indexOf ( '+' ) !== - 1 ? email . indexOf ( '+' ) : email . indexOf ( '@' ) )
53+ + email . substring ( email . indexOf ( '@' ) ) ;
5354 }
5455 return '' ;
5556}
You can’t perform that action at this time.
0 commit comments