chiark / gitweb /
Version protocol
[ypp-sc-tools.web-live.git] / pctb / dictionary-update-receiver
index d80ab216b338220049d8ab6387061cf1c0d4386f..25a6dfc3639a840edbb7b045341b1cdac241d3c6 100755 (executable)
@@ -19,7 +19,7 @@ use CGI qw/:standard -private_tempfiles/;
 use IO::Pipe;
 use IO::Handle;
 
-my $aadepth=3;
+my $aadepth=2;
 
 #---------- pixmaps ----------
 
@@ -161,6 +161,14 @@ sub pipeval ($@) {
 
 #---------- determine properties of the submission ----------
 
+my $version= param('version');
+my $spec_aadepth= param('depth');
+if ($version ne '3'  ||  $spec_aadepth ne $aadepth) {
+    print header('text/plain','403 Client out of date');
+    print "\nYour YPP SC client is out of date.\n";
+    exit 0;
+}
+
 my $dict= param('dict');
 my $entry_in= param('entry');
 defined $entry_in or die Dump()." ?";