Needs more fixing/unification with the proper way of doing it,
but for now let these strings trickle through the translation
machinery for maximum effect.
We don't have to do anything here anymore. Since we started using
pkg(8) the extensions.ini was always consistent, but we needed to
make sure that the order is correct. Some more cleverness was added
to no prevent other PHP modules from simply "plugging in", but since
they are not in one extensions.ini anymore it won't matter.
Expecting some splatter during upgrade, but hopefully also no more
php-suhosin clashes with php56-session not loaded. :)
Whitelisting in Suhosin is needed to make this work, but
unfortunately this will disable whitelisting for all of
phar. A pretty debatable design choice, but for now we
keep this on -devel until we know what to do...
Constraints hook into the default validations, new constraints should derive from BaseConstraint.
This commit contains the code needed to add constraints to our model and a unittest for the UniqueConstraint option.
Add the following to a model field, to force uniqueness for a combination of keys:
<Constraints>
<check001> <!--validation name, unique within this field-->
<message>number should be unique</message> <!--the message to output on validation failure -->
<type>OPNsense\Base\Constraints\UniqueConstraint</type> <!--the class to construct, derived from OPNsense\Base\Constraints\BaseConstraint -->
<addFields> <!--optional additional fields for the equation, defined in UniqueConstraint -->
<field1>optfield</field1>
</addFields>
</check001>
</Constraints>
While there, turn the probing upside down for general sanity:
o Only pull dmesg output once
o Pattern-match one pattern only
o Anchor the match to the line start
The console would refuse to assign an IP that was used by the
PPTP or L2TP server (surprisingly not PPPoE). This rule changed
during the MPD4 -> MDP5 migration, so remove that code. Also,
the subnet check was never executed, good time to remove it as
well.
Errors will be send to syslog, current policy is to always upgrade and ignore migration errors.
(there's not really a way back, other then undo pkg install and revert the full config)