[IM] Validate as-set on input #929
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
[BF] Validate peeringmacro and peeringmacrov6 on input.
Related to #877
Looks there has been some fixes to the scheduled job in the pipeline, but if we can stop bum data from getting into it in the first place, this would also be good.
The scheduled job to update the ASN/prefix list was silently crashing out (again!) when it encountered an invalid entry.
Seems it has not been running properly for some time.
Often when populating from PeeringDB, it contains other spurious text in the as-macro field, like:
RIPE::AS-FOO RIPE::AS-FOO-THING.This PR adds validation to the fields on input, and only accepts the following:-
AS<number>AS-<name>AS<number>:AS-NAMEIt does not accept:-
AS01234RIPE::AS-FOO---AS--FOO-BAR--AS-FOO-BAR-:-AS12345:0-9, A-Z, a-z, -)I've applied this as a local patch to our install to prevent this issue happening again.
R.
In addition to the above, I have:
<?= $t->ee( $data ) ?>or equivalent.