然后正常来说,只需要在一个新行里面注入slaveof xx xx即可实现RCE,此时又有了新的问题。
io.netty.handler.codec.DefaultHeaders
1 2 3 4 5 6 7 8 9 10 11
public T addObject(K name, Object value){ returnthis.add(name, this.valueConverter.convertObject(ObjectUtil.checkNotNull(value, "value"))); } public T add(K name, V value){ this.nameValidator.validateName(name); ObjectUtil.checkNotNull(value, "value"); int h = this.hashingStrategy.hashCode(name); int i = this.index(h); this.add0(h, i, name, value); returnthis.thisT(); }
intprocessCommand(client *c){ if (!scriptIsTimedout()) { /* Both EXEC and scripts call call() directly so there should be * no way in_exec or scriptIsRunning() is 1. * That is unless lua_timedout, in which case client may run * some commands. */ serverAssert(!server.in_exec); serverAssert(!scriptIsRunning()); }
/* in case we are starting to ProcessCommand and we already have a command we assume * this is a reprocessing of this command, so we do not want to perform some of the actions again. */ int client_reprocessing_command = c->cmd ? 1 : 0;
/* only run command filter if not reprocessing command */ if (!client_reprocessing_command) { moduleCallCommandFilters(c); reqresAppendRequest(c); }
/* Handle possible security attacks. */ if (!strcasecmp(c->argv[0]->ptr,"host:") || !strcasecmp(c->argv[0]->ptr,"post")) { securityWarningCommand(c); return C_ERR; }
Spring Cloud Gateway 3.1.6修复了CRLF注入,在添加header的方法中新增了validateValue方法对header value进行校验,不再允许存在换行等空白符。
1 2 3 4 5 6 7 8 9
public T add(K name, V value){ this.validateName(this.nameValidator, true, name); this.validateValue(this.valueValidator, name, value); ObjectUtil.checkNotNull(value, "value"); int h = this.hashingStrategy.hashCode(name); int i = this.index(h); this.add0(h, i, name, value); returnthis.thisT(); }