Skip to content

Commit f8581f7

Browse files
committed
Merged in [14062] from housley@vigilsec.com:
Show which RFC was in force when the IPR disclosure was submitted. Fixes ietf-tools#2309. - Legacy-Id: 14070 Note: SVN reference [14062] has been migrated to Git commit 6d61685
2 parents a1dcba1 + 6d61685 commit f8581f7

3 files changed

Lines changed: 55 additions & 7 deletions

File tree

ietf/ipr/models.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,12 @@ def recursively_updates(self,disc_set=None):
102102
for disc in unseen:
103103
disc_set.update(disc.recursively_updates(disc_set))
104104
return disc_set
105-
105+
106+
def is_thirdparty(self):
107+
"""Returns True if this disclosure is a Third Party disclosure"""
108+
ipr = self.get_child() if self.__class__ is IprDisclosureBase else self
109+
return ipr.__class__ is ThirdPartyIprDisclosure
110+
106111

107112
class HolderIprDisclosure(IprDisclosureBase):
108113
ietfer_name = models.CharField(max_length=255, blank=True) # "Whose Personal Belief Triggered..."

ietf/ipr/views.py

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,44 @@ def set_disclosure_title(disclosure):
132132
title = title[:252] + "..."
133133
disclosure.title = title
134134

135+
def ipr_rfc_number(disclosureDate, thirdPartyDisclosureFlag):
136+
"""Return the RFC as a string that was in force when the disclosure was made."""
137+
138+
# This works because the oldest IPR disclosure in the database was
139+
# made on 1993-07-23, which is more than a year after RFC 1310.
140+
141+
# RFC publication date comes from the RFC Editor announcement
142+
# TODO: These times are tzinfo=pytz.utc, but disclosure times are offset-naive
143+
ipr_rfc_pub_datetime = {
144+
1310 : datetime.datetime(1992, 3, 13, 0, 0),
145+
1802 : datetime.datetime(1994, 3, 23, 0, 0),
146+
2026 : datetime.datetime(1996, 10, 29, 0, 0),
147+
3668 : datetime.datetime(2004, 2, 18, 0, 0),
148+
3979 : datetime.datetime(2005, 3, 2, 2, 23),
149+
4879 : datetime.datetime(2007, 4, 10, 18, 21),
150+
8179 : datetime.datetime(2017, 5, 31, 23, 1),
151+
}
152+
153+
if disclosureDate < ipr_rfc_pub_datetime[1310]:
154+
rfcnum = "Error!"
155+
elif disclosureDate < ipr_rfc_pub_datetime[1802]:
156+
rfcnum = "RFC 1310"
157+
elif disclosureDate < ipr_rfc_pub_datetime[2026]:
158+
rfcnum = "RFC 1802"
159+
elif disclosureDate < ipr_rfc_pub_datetime[3668]:
160+
rfcnum = "RFC 2026"
161+
elif disclosureDate < ipr_rfc_pub_datetime[3979]:
162+
rfcnum = "RFC 3668"
163+
elif disclosureDate < ipr_rfc_pub_datetime[8179]:
164+
rfcnum = "RFC 3979"
165+
else:
166+
rfcnum = "RFC 8179"
167+
168+
if (thirdPartyDisclosureFlag) and (rfcnum == "RFC 3979") and \
169+
(disclosureDate > ipr_rfc_pub_datetime[4879]):
170+
rfcnum = rfcnum + " as updated by RFC 4879"
171+
172+
return rfcnum
135173
# ----------------------------------------------------------------
136174
# Ajax Views
137175
# ----------------------------------------------------------------
@@ -719,6 +757,7 @@ def show(request, id):
719757

720758
return render(request, "ipr/details_view.html", {
721759
'ipr': ipr,
760+
'in_force_ipr_rfc': ipr_rfc_number(ipr.time, ipr.is_thirdparty),
722761
'tabs': get_details_tabs(ipr, 'Disclosure'),
723762
'choices_abc': [ i.desc for i in IprLicenseTypeName.objects.filter(slug__in=['no-license', 'royalty-free', 'reasonable', ]) ],
724763
'updates_iprs': ipr.relatedipr_source_set.all(),

ietf/templates/ipr/details_view.html

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{% extends "base.html" %}
2-
{# Copyright The IETF Trust 2015, All Rights Reserved #}
2+
{# Copyright The IETF Trust 2015, 2017. All Rights Reserved. #}
33
{% load origin %}
44

55
{% load ietf_filters ipr_filters %}
@@ -40,9 +40,13 @@ <h1>IPR Details<br><small>{{ ipr.title }}</small></h1>
4040
</div>
4141

4242
{% if not ipr.compliant %}
43-
<p class="alert alert-danger">This IPR disclosure does not comply with the formal requirements of Section 5,
44-
"IPR Disclosures," of <a href="https://www.ietf.org/rfc/rfc8179.txt">RFC 8179</a>, "Intellectual Property Rights in IETF Technology."
45-
</p>
43+
{% if in_force_ipr_rfc == 'RFC 8179' %}
44+
<p class="alert alert-danger">This IPR disclosure does not comply with the formal requirements of Section 5,
45+
"IPR Disclosures," of <a href="https://www.rfc-editor.org/rfc/rfc8179.txt">RFC 8179</a>, "Intellectual Property Rights in IETF Technology."</p>
46+
{% else %}
47+
<p class="alert alert-danger">This IPR disclosure does not comply with the formal requirements of Section 6,
48+
"IPR Disclosures," of <a href="https://www.rfc-editor.org/rfc/rfc3979.txt">RFC 3979</a>, "Intellectual Property Rights in IETF Technology."</p>
49+
{% endif %}
4650
{% endif %}
4751

4852
{% if ipr.has_legacy_event %}
@@ -51,7 +55,7 @@ <h1>IPR Details<br><small>{{ ipr.title }}</small></h1>
5155

5256
<div>
5357
<strong>Submitted:</strong>
54-
{{ ipr.time|date:"F j, Y" }}
58+
{{ ipr.time|date:"F j, Y" }} under the rules in {{ in_force_ipr_rfc }}
5559
</div>
5660

5761
<div>
@@ -171,7 +175,7 @@ <h2>{% cycle section %}. IETF Document or Other Contribution to Which this IPR D
171175
{% endif %}
172176

173177
{% if ipr.patent_info or ipr.has_patent_pending %}
174-
<h2>{% cycle section %}. Disclosure of Patent Information <small>i.e., patents or patent applications required to be disclosed by Section 6 of RFC 8179</small></h2>
178+
<h2>{% cycle section %}. Disclosure of Patent Information <small>i.e., patents or patent applications required to be disclosed by {{ in_force_ipr_rfc }}</small></h2>
175179

176180
<p>A. For granted patents or published pending patent applications, please provide the following information:</p>
177181

0 commit comments

Comments
 (0)