Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

no date in "changed:" attribute should autofill a date #242

Closed
job opened this issue Jul 1, 2019 · 3 comments
Closed

no date in "changed:" attribute should autofill a date #242

job opened this issue Jul 1, 2019 · 3 comments
Assignees

Comments

@job
Copy link
Member

job commented Jul 1, 2019

When an object is submitted to the IRRd instance, the convention in version 2 and 3 was that if you'd leave out the date in the changed: attribute, the IRRd instance fills in the date. So submitting an object on July 1st 2019 like changed: job@ntt.net would autocomplete into changed: job@ntt.net 20190701 in the database.

It is possible there is no documentation about this feature.

There also was a bug, on that note, I'd like to propose that people can't 'back date' objects. The previous IRRd versions would gladly accept changed: job@ntt.net 17840101. So, if people fill in no date, or any date, the IRRd should just store today's date.

Unless the override: is used, than the IRRd should either autocomplete to today's date, or accept the value that was submitted.

@mxsasha
Copy link
Collaborator

mxsasha commented Jul 2, 2019

Is there any more to the format of the changed: line? Is it always <email> YYYMMDD or <email>? Are users allowed to add comments which should be retained?

(For non-override cases we wouldn't actually care which date format they used - we'll only get the e-mail address from their entry and then add our own date.)

@job
Copy link
Member Author

job commented Jul 2, 2019

excellent question. comments are legal in this context, so we can have:

<email> YYYMMDD
or
<email> YYYMMDD # hello comment my old friend
or
<email>

as input, which could result in:

job@ntt.net 20190702
or
job@ntt.net 20190702 # hello comment my old friend
or respectively
job@ntt.net 20190702

@mxsasha
Copy link
Collaborator

mxsasha commented Jul 8, 2019

These are the proposed release notes, if you can confirm this behaviour to be correct, I can create 4.0.4:

In earlier versions of IRRd, format of the `changed`
attribute was entirely free. In IRRd 4.0.4, the format
is expected to be ``<email> [YYYYMMDD]` with an optional
comment, as allowed with other RPSL attributes. The date
is optional. Regardless of the date, if any, set in the
attribute, it will be overwritten by today's date,
unless the override password was used. Pre-existing
`changed` attributes are not affected.

mxsasha added a commit that referenced this issue Jul 15, 2019
…ed. (#244)

Backport of d68ce2a from master.

* Add field type for changed lines.
* Add RPSLObject support for overwriting new changed lines.
* Update dates in new changed: lines when override is not used.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants