pysaml2 icon indicating copy to clipboard operation
pysaml2 copied to clipboard

MetaDataLoader raises SAMLError("No file specified.")

Open robinelvin opened this issue 6 months ago • 0 comments

I need to load metadata from a database and I'm trying to use the "loader" type with a function. When I try to do this I get SAMLError("No file specified."). Looking at the code this is coming from the MetaDataFile which is the superclass of MetaDataLoader because the filename kwarg is not being passed. It shouldn't need a filename because there is no file - it is coming from a function call. If I patch MetadataStore like this it fixes the issue:

        elif typ == "loader":
            key = args[1]
            _args["filename"] = "foo" # <- Added this to work around the issue
            _md = MetaDataLoader(self.attrc, args[1], **_args)

robinelvin avatar Jul 24 '25 17:07 robinelvin