mirror of https://github.com/redis/redis.git
				
				
				
			A change in #10612 introduced a regression. when replying with garbage bytes to the caller, we must make sure it doesn't include any newlines. in the past it called rejectCommandFormat which did that trick. but now it calls rejectCommandSds, which doesn't, so we need to make sure to sanitize the sds.
This commit is contained in:
		
							parent
							
								
									119ec91a5a
								
							
						
					
					
						commit
						79ffc3524d
					
				|  | @ -3520,6 +3520,9 @@ int commandCheckExistence(client *c, sds *err) { | |||
|                             (char*)c->argv[0]->ptr, args); | ||||
|         sdsfree(args); | ||||
|     } | ||||
|     /* Make sure there are no newlines in the string, otherwise invalid protocol
 | ||||
|      * is emitted (The args come from the user, they may contain any character). */ | ||||
|     sdsmapchars(*err, "\r\n", "  ",  2); | ||||
|     return 0; | ||||
| } | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue