Yioop URL Paths and Their Arguments

This page lists each url path Yioop answers, the request fields each activity reads, who may call it, and the checks made on the way. It was written for the version 10 security audit. The fields listed for an activity are the ones its own code reads from the request; a component may read more through the controller it belongs to.

How a request finds its controller

A url of the form ?c=controller&a=activity names the controller and the activity directly. With redirects on, src/index.php turns the first part of a path into these fields before any controller runs:

Public controllers

Who may call: anyone; an activity not in the list falls back to query. Fields SearchController reads for every activity: YIOOP_TOKEN, a, arg, callback, category, f, field, from_cache, guess, hist_open, imagecolor, imagelayout, imagesize, its, lang, limit, machine, maxvideoduration, minvideoduration, mirror, network, no_query, num, open_in_tabs, order, period, perpage, q, raw, repository, s, safe_search, save_timestamp, term, timeperiod, videoresolution.

static

Who may call: anyone; reads pages of the public group or of the group a domain is routed to. Fields StaticController reads for every activity: CSVFORM, a.

resource

Who may call: get and suggest for anyone; a private group's resources are checked in checkAndLogViewGetBaseFolder; syncList and syncNotify need the machine check below. Fields ResourceController reads for every activity: a.

register

Who may call: anyone; sign-up, recovery and url suggestion pages ask a hash captcha; recovery and email links carry hashes compared with hash_equals. Fields RegisterController reads for every activity: YIOOP_TOKEN, a, arg, email, password, repassword.

api

Who may call: anyone may reach it; for a signed-in user the YIOOP_TOKEN form token is checked as in the admin controller. Fields ApiController reads for every activity: YIOOP_TOKEN, a, page_name.

Signed-in controllers

admin

Who may call: a signed-in user whose roles allow the activity, with a valid YIOOP_TOKEN form token; the arguments the role allows are handed to the activity; a suspended or inactive user is allowed no activity, and a request without a token is sent to sign in. Fields AdminController reads for every activity: YIOOP_TOKEN, a, arg, c, domain_handoff, p, page_id, page_name, preserve, u.

group

Who may call: groupFeeds is open to anyone; wiki, userMessages and gitService need the reader's roles to allow them, a signed-out reader being the public user; the feed, wiki, message and git components then check the reader's access to the group, page, thread or conversation they read.

Checks inside admin and group activities

The controller lets a request reach an activity only when one of the reader's roles allows it. A new site gives its roles these activities:

Machine-to-machine controllers

archive, classifier, crawl, fetch, jobs, machine

Who may call: only another Yioop machine of the same site: the request's time must be within AUTOLOGOUT of this machine's clock and its session must be md5 of that time and AUTH_KEY, compared with hash_equals; the activity must be in the controller's list. Fields ArchiveController reads for every activity: a. Fields ClassifierController reads for every activity: a. Fields CrawlController reads for every activity: a. Fields FetchController reads for every activity: a, c, downloads_per_hour, machine_uri, p, robot_instance. Fields JobsController reads for every activity: a, args, job, machine_id. Fields MachineController reads for every activity: a.

Checks made on every request

Fixed in the version 10 audit