diff --git a/src/rp.c b/src/rp.c index bdeaa4e65..a5153cefd 100644 --- a/src/rp.c +++ b/src/rp.c @@ -398,6 +398,10 @@ int cpu_rule_to_kernel_rule (char *rule_buf, u32 rule_len, kernel_rule_t *rule) } switch (rule_buf[rule_pos+2]) { + case '\'': + SET_NAME (rule, rule_buf[rule_pos]); + SET_P0 (rule, rule_buf[rule_pos]); + break; case ' ': case '?': SET_NAME (rule, rule_buf[rule_pos]); diff --git a/src/rp_cpu.c b/src/rp_cpu.c index da4fd38c0..05d54df3e 100644 --- a/src/rp_cpu.c +++ b/src/rp_cpu.c @@ -822,7 +822,7 @@ int _old_apply_rule (const char *rule, int rule_len, char in[RP_PASSWORD_SIZE], if (rule_new[rule_pos] == '?') { - if ((rule_pos + 1) == rule_len_new) + if ((rule_pos + 1) == rule_len_new || ((rule_pos + 1) < rule_len_new && rule_new[rule_pos+1] == '\'')) { out_len = mangle_purgechar (out, out_len, rule_new[rule_pos]); break;