Top Menu

Jump to content
Home
    Modules
      • Projects
      • Activity
      • Work packages
      • Gantt charts
      • Calendars
      • Team planners
      • Boards
      • News
    • Getting started
    • Introduction video
      Welcome to OpenProject Community
      Get a quick overview of project management and team collaboration with OpenProject. You can restart this video from the help menu.

    • Help and support
    • Upgrade to Enterprise edition
    • User guides
    • Videos
    • Shortcuts
    • Community forum
    • Enterprise support

    • Additional resources
    • Data privacy and security policy
    • Digital accessibility (DE)
    • OpenProject website
    • Security alerts / Newsletter
    • OpenProject blog
    • Release notes
    • Report a bug
    • Development roadmap
    • Add and edit translations
    • API documentation
  • Sign in
      Forgot your password?

      or sign in with your existing account

      Google

Side Menu

  • Overview
  • Activity
    Activity
  • Roadmap
  • Work packages
    Work packages
  • Gantt charts
    Gantt charts
  • Calendars
    Calendars
  • Team planners
    Team planners
  • Boards
    Boards
  • News
  • Forums

Content

Development
  1. OpenProject
  2. Forums
  3. Development
  4. Webhook hmac signature with php

Webhook hmac signature with php

Added by Thomas Keil about 4 years ago

Hello everyone,

I'm trying to connect OpenProject to a PHP-Script, which works fine, but I can't generate a correct hmac-hash to verify OpenProject as sender.

This is my code:

$rawdata = file_get_contents("php://input");
$hash = hash_hmac("sha1", $rawdata, "test123");

Quite simple, my keys are the same (checked that like 1000 times), but the hashes differ.

The Request's header states: 3ce4bf27a90fd773cf9b2fd1f0cd4f6c850a9263
but my hash is actually 6396bacdb89cca760fb102f4ed2b081f31ca8e5a

What am I doing wrong? Is the raw body somehow encoded that needs decoding first, or something else that I missed?

Thanks for your help
Thomas


Loading...