kometenstaub / metadata-extractor

Obsidian Plugin that provides metadata export for use with third-party apps.
MIT License
100 stars 7 forks source link

Problem with exported Backlinks #18

Closed secure-77 closed 2 years ago

secure-77 commented 2 years ago

Hi,

first of all thank you for this great plugin! I`am using this in my solution Perlite to build the graph.

Unfortunately I have a strange problem with some backlinks. It seams that this problem is related to similar file names but I cant confirm this finally.

The exporter create backlinks to other files, where no backlink exists, also these backlings switches sometimes from one md to another, without doing any changes.

Check this example from the metadata.json.

"fileName": "WriteUp",
    "relativePath": "WriteUps/TryHackMe/Skynet/WriteUp.md",
    "backlinks": [
      {
        "fileName": "_Windows Priv Esc",
        "link": "WriteUp",
        "relativePath": "OFFSEC Notes/Windows Related/_Windows Priv Esc.md",
        "displayText": "../../WriteUps/TryHackMe/Alfred/WriteUp"
      },
      {
        "fileName": "WinRM SSL Authentication",
        "link": "WriteUp",
        "relativePath": "OFFSEC Notes/Windows Related/WinRM SSL Authentication.md",
        "displayText": "../../WriteUps/HackTheBox/Timelapse/WriteUp"
      },
      {
        "fileName": "Tokens",
        "link": "WriteUp",
        "relativePath": "OFFSEC Notes/Windows Related/Tokens.md",
        "displayText": "../../WriteUps/TryHackMe/Alfred/WriteUp"
      },
      {
        "fileName": "SCF SMB URL Attack",
        "link": "WriteUp",
        "relativePath": "OFFSEC Notes/Windows Related/SCF SMB URL Attack.md",
        "displayText": "../../WriteUps/HackTheBox/Driver/WriteUp"
      },
      {
        "fileName": "LAPS",
        "link": "WriteUp",
        "relativePath": "OFFSEC Notes/Windows Related/LAPS.md",
        "displayText": "../../WriteUps/HackTheBox/Timelapse/WriteUp"
      },
      {
        "fileName": "SSTI",
        "link": "WriteUp",
        "relativePath": "OFFSEC Notes/OWASP and Web Attacks/SSTI.md",
        "displayText": "../../WriteUps/HackTheBox/Spider/WriteUp"
      },
      {
        "fileName": "Reverse Tabnabbing",
        "link": "WriteUp",
        "relativePath": "OFFSEC Notes/OWASP and Web Attacks/Reverse Tabnabbing.md",
        "displayText": "../../WriteUps/HackTheBox/Developer/WriteUp"
      },
      {
        "fileName": "Net Desirialization",
        "link": "Writeup",
        "relativePath": "OFFSEC Notes/OWASP and Web Attacks/Net Desirialization.md",
        "displayText": "../../WriteUps/HackTheBox/Sharp/Writeup"
      },
      {
        "fileName": "CORS",
        "link": "WriteUp",
        "relativePath": "OFFSEC Notes/OWASP and Web Attacks/CORS.md",
        "displayText": "../../WriteUps/HackTheBox/Developer/WriteUp"
      },
      {
        "fileName": "IPMI",
        "link": "WriteUp",
        "relativePath": "OFFSEC Notes/Network Services/IPMI.md",
        "displayText": "../../WriteUps/HackTheBox/Shibboleth/WriteUp"
      },
      {
        "fileName": "FTP",
        "link": "WriteUp",
        "relativePath": "OFFSEC Notes/Network Services/FTP.md",
        "displayText": "../../WriteUps/HackTheBox/Pikaboo/WriteUp"
      },
      {
        "fileName": "Mongo and NoSQL",
        "link": "WriteUp",
        "relativePath": "OFFSEC Notes/Databases/Mongo and NoSQL.md",
        "displayText": "../../WriteUps/HackTheBox/Secret/WriteUp"
      },
      {
        "fileName": "LDAP",
        "link": "WriteUp",
        "relativePath": "OFFSEC Notes/Databases/LDAP.md",
        "displayText": "../../WriteUps/HackTheBox/Pikaboo/WriteUp"
      },
      {
        "fileName": "Perl",
        "link": "WriteUp",
        "relativePath": "OFFSEC Notes/BASIC Fundamentals/Perl.md",
        "displayText": "../../WriteUps/HackTheBox/Pikaboo/WriteUp"
      },
      {
        "fileName": "OTP",
        "link": "WriteUp",
        "relativePath": "OFFSEC Notes/BASIC Fundamentals/OTP.md",
        "displayText": "../../WriteUps/HackTheBox/Static/WriteUp"
      }
    ]
  },

But actually there are no Backlinks to this file: image

Thanks for looking into this!

BR, sec77

kometenstaub commented 2 years ago

Could you show me the output for one of the files that is supposed to have a link to that file? The backlinks are calculated from the paths of the links. I resolve their paths with an Obsidian API method, so I don’t understand why it would point to another file of that name.

If you attach a vault without any private data in which you can reproduce the bug (just a vault with a couple of files so that it’s easy to test/debug), I can take a look.

secure-77 commented 2 years ago

Nevermind... I found the problem, it seams that I had a really old version of the plugin installed, thought plugins will auto update, but this was not the case.

image

After updating to the latest version everything is fine and the backlinks are gone.

Sorry for the Issue and thank you for the help. I will close this issue.

BR, sec77