Bug 21847

Summary: OAI-PMH server should enforce correct syntax for identifiers (including OAI-PMH:archiveID)
Product: Koha Reporter: David Cook <dcook>
Component: Web servicesAssignee: Bugs List <koha-bugs>
Status: CLOSED WONTFIX QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low    
Version: Main   
Hardware: All   
OS: All   
GIT URL: Initiative type: ---
Sponsorship status: --- Comma delimited list of Sponsors:
Crowdfunding goal: 0 Crowdfunding committed: 0
Crowdfunding contact: Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:

Description David Cook 2018-11-16 06:46:31 UTC
According to http://www.openarchives.org/OAI/2.0/guidelines-oai-identifier.htm, OAI-PMH identifier must follow this format:

  oai-identifier = scheme ":" namespace-identifier ":" local-identifier

  scheme = "oai"

  namespace-identifier = domainname-word "." domainname
  domainname = domainname-word [ "." domainname ]
  domainname-word = alpha *( alphanum | "-" )

  local-identifier = 1*uric

At the moment in Koha you can put whatever you like in OAI-PMH:archiveID and make all sorts of invalid identifiers. We should change this.
Comment 1 David Cook 2020-02-18 01:44:33 UTC
It would be good to actually have a subsystem of "global system preference" validation rules...
Comment 2 David Cook 2023-09-12 23:40:44 UTC
(In reply to David Cook from comment #0)
> At the moment in Koha you can put whatever you like in OAI-PMH:archiveID and
> make all sorts of invalid identifiers. We should change this.

I suppose the problem here is that we can't really add validation rules when we've allowed whatever for many years.