<h5 dir="auto">ISSUE TYPE</h5>

<ul dir="auto">
<li>Bug Report</li>
</ul>
<h5 dir="auto">COMPONENT NAME</h5>

<p dir="auto">Templating</p>
<h5 dir="auto">ANSIBLE VERSION</h5>

<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="1.8.2"><pre class="notranslate"><code class="notranslate">1.8.2
</code></pre></div>
<h5 dir="auto">CONFIGURATION</h5>

<h5 dir="auto">OS / ENVIRONMENT</h5>

<p dir="auto">N/A (but rhel7)</p>
<h5 dir="auto">SUMMARY</h5>

<p dir="auto">When entering passwords for login/sudo, they are parsed by the templater instead of being used literally.  This creates unexpected behaviour - for example, with a password that contains a '{':</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ ansible -i &quot;testhost1,&quot; all -k -m ping
SSH password:
testhost1 | FAILED =&gt; template error while templating string: unexpected token 'eof' 
$"><pre class="notranslate"><code class="notranslate">$ ansible -i "testhost1," all -k -m ping
SSH password:
testhost1 | FAILED =&gt; template error while templating string: unexpected token 'eof' 
$
</code></pre></div>
<p dir="auto">If the substring in the password were valud template syntax we'd just get 'invalid password' errors, which would be even more confusing.<br>
There is potential for destructive behaviour and - while very minor - potential security concerns by use of a malicious password (I don't have a specific example, but in places with esoteric security implementations one could see this being exploitable).</p>
<h5 dir="auto">STEPS TO REPRODUCE</h5>

<ul dir="auto">
<li>Set password on remote host '123abc{'</li>
<li>Attempt ansible run with -k</li>
</ul>

<div class="highlight highlight-source-yaml notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=""><pre class="notranslate"></pre></div>

<h5 dir="auto">EXPECTED RESULTS</h5>

<p dir="auto">Successfully authenticates against remote host and runs my command</p>
<h5 dir="auto">ACTUAL RESULTS</h5>

<p dir="auto">Connecting to host host fails with 'error while templating string'</p>

<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="SSH password:
testhost1 | FAILED =&gt; template error while templating string: unexpected token 'eof' "><pre class="notranslate"><code class="notranslate">SSH password:
testhost1 | FAILED =&gt; template error while templating string: unexpected token 'eof' 
</code></pre></div>
<h5 dir="auto">ISSUE TYPE</h5>
<ul dir="auto">
<li>Documentation Report</li>
</ul>
<h5 dir="auto">COMPONENT NAME</h5>
<p dir="auto"><a href="https://docs.ansible.com/ansible/latest/dev_guide/developing_modules_documenting.html#return-block" rel="nofollow">https://docs.ansible.com/ansible/latest/dev_guide/developing_modules_documenting.html#return-block</a></p>
<h5 dir="auto">ANSIBLE VERSION</h5>
<p dir="auto">N/A since it's web documentation</p>
<h5 dir="auto">CONFIGURATION</h5>
<p dir="auto">N/A</p>
<h5 dir="auto">OS / ENVIRONMENT</h5>
<p dir="auto">N/A</p>
<h5 dir="auto">SUMMARY</h5>
<p dir="auto">Documentation has the description for<code class="notranslate">returned</code> as "When this value is returned, such as always, on success, always". First, always is repeated. Second, it should list all the options for returned and not just 3.</p>
<h5 dir="auto">STEPS TO REPRODUCE</h5>
<p dir="auto">N/A</p>
<h5 dir="auto">EXPECTED RESULTS</h5>
<p dir="auto">I'd expect this to be more thorough with a bulleted list of values and what they mean. Such as...</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="always - Returned on every request
success - Returned only when request was successful"><pre class="notranslate"><code class="notranslate">always - Returned on every request
success - Returned only when request was successful
</code></pre></div>
<h5 dir="auto">ACTUAL RESULTS</h5>
<p dir="auto">See webpage.</p>