{% if page.name %}{% capture name %}{{page.name}} Irssi Security Advisory {% include sec_txt/link.md t="[1]" l="#references" md=include.md %}{% endcapture %}{{name}} {% for i in (1..name.size) %}={% endfor %}{% comment %} The list of all CVE {% endcomment %} {% if page.heading %}{% if include.md %}#### {% endif %}{{ page.heading }} {% endif %}{% capture cves %}{{ page.bugs | map: 'cve' | uniq | join: ', ' }}{% endcapture %}{% if cves == "" %}[ CVE will be added here ]{% else %}{{cves}}{% endif %} {% capture nl %} {% endcapture %} {% comment %} {% endcomment -%} Description ----------- {% if page.description %}{% include sec_txt/wrap.txt text=page.description md=include.md %}{% elsif page.bugs.size > 1 %}{% if page.bugs.size > 2 %}Multiple{% elsif page.bugs.size > 1 %}Two{% endif %} vulnerabilities have been located in {{ page.affected_note | default: 'Irssi' }}. {% endif %}{% assign refs = "" %}{% assign refctr = 2 %}{% assign lttrs = 'abcdefghijklmn' | split: '' %}{% assign count = 0 %}{% for bug in page.bugs %}{% capture fl %}({{ lttrs[forloop.index0] }}){% endcapture %}{% if include.md %}{% assign fl = "0." %}{% endif %}{% capture text %}{% if bug.description_long %}{{ bug.description_long }}{% else %}{{ bug.description }} {% if bug.credit %}{% assign desc_is_sent = bug.description | split: "" | reverse %}{% if desc_is_sent[0] == "." %}F{% else %}f{% endif %}ound by {{ bug.credit }}{% endif %}.{% if bug.cwe %} ({{ bug.cwe }}){% endif %}{% endif %}{% endcapture %}{% include sec_txt/wrap.txt text=text fl=fl md=include.md %}{% if bug.cve %} {{ bug.cve }} {% assign t = '[' | append: refctr | append: ']' %}{% include sec_txt/link.md t=t l="#references" md=include.md %}{% assign refs = refs | append: 'http://cve.mitre.org/cgi-bin/cvename.cgi?name=' | append: bug.cve | append: ' ' %}{% assign refctr = refctr | plus: 1 %} was assigned to this issue. {% endif %}{% endfor %}{% capture impact %}{% if page.impact %}{% include sec_txt/wrap.txt text=page.impact md=include.md %}{% endif %}{% capture has_info %}{% for bug in page.bugs %}{% if bug.impact %}.{% endif %}{% endfor %}{% endcapture %}{% if has_info != "" %}{% for bug in page.bugs %}{% capture fl %}({{ lttrs[forloop.index0] }}){% endcapture %}{% if include.md %}{% assign fl = "0." %}{% endif %}{% if include.md or bug.impact %}{% include sec_txt/wrap.txt text=bug.impact fl=fl md=include.md %}{% endif %}{% endfor %}{% endif %}{% endcapture %}{% include sec_txt/header_unless_empty.txt title="Impact" wrap=false ht="-" text=impact %}{% capture versions %}{% for bug in page.bugs %}{% capture fl %}({{ lttrs[forloop.index0] }}){% endcapture %}{% if include.md %}{% assign fl = "0." %}{% endif %}{% capture text %}{% if bug.affected_versions.from %}{{page.affected_versions | default: 'Irssi' }} {{bug.affected_versions.from|join: ", "}} and later{% else %}All {{page.affected_note | default: 'Irssi' }} versions that we observed{% endif %}{% if bug.affected_note_long %}{% assign note_ml = bug.affected_note_long | slice: 0 %}{% unless nl == note_ml %},{% endunless %} {{bug.affected_note_long}}{% elsif bug.affected_note_bottom %}, {{bug.affected_note_bottom}}{% endif %}{% endcapture %}{% include sec_txt/wrap.txt text=text fl=fl md=include.md %}{% endfor %}{% endcapture %}{% include sec_txt/header_unless_empty.txt title="Affected versions" wrap=false ht="-" text=versions %}{%- comment %} {% endcomment %}{% capture fixed %}{% if page.fixed_in %}{{page.fixed_in}}{% else %}{{page.affected_note | default: 'Irssi' }} {{page.bugs[0].fixed_version|join:", "}}{% endif %}{% endcapture %}{% include sec_txt/header_unless_empty.txt title="Fixed in" ht="-" text=fixed %}{%- comment %} {% endcomment %}{% include sec_txt/header_unless_empty.txt title="Recommended action" ht="-" text=page.recommended_action %}{% if page.extra2 %}{% for xtra in page.extra2 %}{% include sec_txt/header_unless_empty.txt title=xtra.title ht="-" text=xtra.text %}{% endfor %}{% endif %}{% capture mitigating_info %}{% if page.mitigating_info %}{% include sec_txt/wrap.txt text=page.mitigating_info md=include.md %}{% endif %}{% capture has_info %}{% for bug in page.bugs %}{% if bug.mitigating_info %}.{% endif %}{% endfor %}{% endcapture %}{% if has_info != "" %}{% for bug in page.bugs %}{% capture fl %}({{ lttrs[forloop.index0] }}){% endcapture %}{% if include.md %}{% assign fl = "0." %}{% endif %}{% if include.md or bug.mitigating_info %}{% include sec_txt/wrap.txt text=bug.mitigating_info fl=fl md=include.md %}{% endif %}{% endfor %}{% endif %}{% endcapture %}{% include sec_txt/header_unless_empty.txt title="Mitigating facts" wrap=false ht="-" text=mitigating_info %}{% capture patch %}{% if page.patch %}{{page.patch}} {% elsif page.git_commit %}{% if include.md %}[irssi/{{page.repo | default: 'irssi' }}@`{{page.git_commit|truncate: 12}}`](https://github.com/irssi/{{page.repo | default: 'irssi' }}/commit/{{page.git_commit}}){% else %}https://github.com/irssi/{{page.repo | default: 'irssi' }}/commit/{{page.git_commit}}{% endif %} {% endif %}{% endcapture %}{% include sec_txt/header_unless_empty.txt title="Patch" wrap=false ht="-" text=patch %} {% comment %} {% endcomment %}{% capture discussion %}{% if page.discussion %}{% include sec_txt/wrap.txt text=page.discussion md=include.md %}{% endif %}{% capture has_info %}{% for bug in page.bugs %}{% if bug.discussion %}.{% endif %}{% endfor %}{% endcapture %}{% if has_info != "" %}{% for bug in page.bugs %}{% capture fl %}({{ lttrs[forloop.index0] }}){% endcapture %}{% if include.md %}{% assign fl = "0." %}{% endif %}{% if include.md or bug.discussion %}{% include sec_txt/wrap.txt text=bug.discussion fl=fl md=include.md %}{% endif %}{% endfor %}{% endif %}{% endcapture %}{% include sec_txt/header_unless_empty.txt title="Discussion" wrap=false ht="-" text=discussion %} References ---------- {% if include.md %}
0. [https://irssi.org{{page.url | replace: '/html/', '/' | split: '' | reverse | join: '' | remove_first: '/' | split: '' | reverse | join: '' }}.txt](https://irssi.org{{page.url | replace: '/html/', '/' | split: '' | reverse | join: '' | remove_first: '/' | split: '' | reverse | join: '' }}.txt) {% else %}[1] https://irssi.org{{page.url}} {% endif %}{% assign refarr = refs | split: ' ' %}{% for ref in refarr %}{% if include.md %}0. [{{ref}}]({{ref}}) {% else %}[{{ forloop.index | plus: 1 }}] {{ref}} {% endif %}{% endfor %}{% if include.md %}
{% endif -%}{% else %}{{ content }}{% endif -%}