Results 1 to 7 of 7

Thread: md5sums version header for use by "Suspect File Versions" diagnostic

  1. #1
    Member dfidler is on a distinguished road
    Join Date
    Apr 2008
    Location
    London, UK
    Posts
    57

    md5sums version header for use by "Suspect File Versions" diagnostic

    I'd like a standard header that module developers can use to make use of the file version check diagnostic. Right now, it will only check the 'version' of a set of files if one of the first 10 lines of the source contain the following string/pseudo regexp:

    "|| # VBulletin[^0-9]* (\d.*) -"

    Obviously, it doesn't make sense for module developers to include that string because they aren't vBulletin.

    Could I please suggest that add something like the following regexp to the 'version' check logic:

    "^[/\|\* ]* MD5 Version: *[^0-9]* (\d.*)\w*$"

    This way, any module developer can add a string to their own header files that will take advantage of the version checking code.

    From reading the code, I can see that creating an md5_sum_* file will work, but they won't be able to take advantage of the actual code verision check.

    Cheers,
    Dave.

  2. #2
    vBulletin Developer David Grove has a spectacular aura about David Grove has a spectacular aura about David Grove has a spectacular aura about David Grove's Avatar
    Join Date
    Apr 2008
    Location
    The West Coast
    Posts
    3,292
    This would be really nice.

  3. #3
    Former vBulletin Developer Scott MacVicar is on a distinguished road
    Join Date
    Dec 2000
    Location
    Reading, UK
    Posts
    13,332
    Blog Entries
    1
    If you add the md5sum to the file it then changes the md5sum of the file, you'd have to strip it before doing the check in the future which could cause confusion if you decide to use a command line tool.
    Scott MacVicar

    My Blog | Twitter

  4. #4
    vBulletin Developer David Grove has a spectacular aura about David Grove has a spectacular aura about David Grove has a spectacular aura about David Grove's Avatar
    Join Date
    Apr 2008
    Location
    The West Coast
    Posts
    3,292
    Some way of checking the actual version of an addon file, instead of just checking if the checksum is the same, would be nice.

  5. #5
    vBulletin Team Zachery has a spectacular aura about Zachery has a spectacular aura about Zachery has a spectacular aura about Zachery's Avatar
    Join Date
    Jul 2002
    Location
    Cleveland, Ohio
    Age
    24
    Posts
    41,847
    I know it used to check the version number, i think it still does.
    Zachery Woods
    vBulletin Support Team
    Please do not PM me for support
    $this->hasFlavr() ? $nom->nom('nom') : $want->doNot()

  6. #6
    Member dfidler is on a distinguished road
    Join Date
    Apr 2008
    Location
    London, UK
    Posts
    57
    Quote Originally Posted by Scott MacVicar View Post
    If you add the md5sum to the file it then changes the md5sum of the file, you'd have to strip it before doing the check in the future which could cause confusion if you decide to use a command line tool.
    But the md5sum of the md5_sum file doesn't matter; just don't put it in there and it won't get picked up as a failure by the diags (at least they don't on my 3.7.3.1 install).

    @Zachery - As for checking the version of the file it will do that, but per my original message, it will only do that for files that have a header that contain the text

    || # VBulletin ..... x.y.z -

    The diags code strips out the x.y.z and compares that to the results of the line:

    $md5_sum_versions['someproduct-name']

    Which is why you set that variable at the bottom of the md5sum. And the version check really only exists so that the vB diags can say

    "This file is from the wrong version you dinglewitz!" (I'm paraphrasing there).

    Anyways, the code to implement this request is 2 lines of code so I'm hoping it's really easy to include (documentation, on the other hand, will take more effort)

    Cheers,
    Dave.

  7. #7
    Member dfidler is on a distinguished road
    Join Date
    Apr 2008
    Location
    London, UK
    Posts
    57
    Hmm... this is strange; I was sure that I'd already uploaded this but here is the shell script that I'm using to generate my md5_sums files now (attached).

    Usage is pretty simple:

    gen_vb_md5.sh <root directory of your uninstalled code> <output md5 file>

    It uses $VERSION and $PRODUCT to fill in the version info. The attached one is defaults $PRODUCT to vbgallery for but that's easy enough to change. I was thinking of screwing around with getopt but decided against it for reasons of personal sanity.

    Note: I've already filed Bugs or Enhancement requests with Photopost/vBGallery and vBA CMPS to have them include md5_sum files in future releases.

    I hope they do it.

    Cheers,
    Dave.


    [edit] Yes, I know the shell script is a dirty hack; but it was fast. [/edit]

    [edit]2008-11-04 1200 GMT - updated the attachment; fixed a bug in it.[/edit]
    Attached Files
    Last edited by dfidler; Tue 4th Nov '08 at 8:01am.

Similar Threads

  1. "Excluded Files" Option for Suspect File Versions Feature
    By NeutralizeR in forum vBulletin Suggestions and Feedback
    Replies: 5
    Last Post: Sun 7th Sep '08, 3:36pm
  2. Diagnostics "Suspect File Versions" doesn't see foreign folders and files inside them
    By Makc666 in forum vBulletin Suggestions and Feedback
    Replies: 2
    Last Post: Tue 25th Sep '07, 12:03pm
  3. several "Suspect File Versions"
    By rnmcd in forum vBulletin 3.6 Questions, Problems and Troubleshooting
    Replies: 1
    Last Post: Wed 29th Nov '06, 12:52am
  4. RC1 files found in "Suspect File Versions" check
    By mOdEtWo in forum vBulletin 3.5 'How Do I' Questions and Troubleshooting
    Replies: 13
    Last Post: Thu 4th Aug '05, 7:44pm
  5. Suspect File Versions
    By monstergamer in forum vBulletin 3.0 How Do I and Troubleshooting Forum
    Replies: 13
    Last Post: Tue 10th Feb '04, 1:46am

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts